This indicator plots five different time frames as a stacked chart. The circles or dots at the bottom represent the difference between the closing price of each time frame and its associated pivot price [(high + low + close)/3]. The value plotted at 4, in this case, represents the 5 minute time frame. The 10-minute time frame is represented by the plot at 3 and so on. The value plotted at 7 represents the composite of all the time frames. It is only turned on if all times are either red or green. If there is a disagreement then nothing is plotted.
This indicator is relatively simple even though the plot looks complicated. You have to make sure the indicator is plotted in a separate pane. The y – axis has 0 and 8 as its boundaries. All you have to do is keep track of the highest highs/lowest lows for each time frame. I use a multiplier of the base time frame to create different time frames. TimeFrame1Mult = 2 represents 10 minutes and TimeFrame2Mult = 3 and that represents 15 minutes. The indicator shows how strong the current swing is across five different time frames. When you start getting a mix of green and red dots this could indicate a short term trend change. You can use the EasyLanguage to plug in any indicator over the different time frames. Here’s the code. Just email me with questions or if you see a mistake in the coding.
{EasyLanguage MultiTime Frame Indicator)
written by George Pruitt - copyright 2019 by George Pruitt
}
Inputs:tf1Mult(2),tf2Mult(3),tf3Mult(4),tf4Mult(5);
vars: mtf1h(0),mtf1l(0),mtf1o(0),mtf1c(0),mtf1pvt(0),diff1(0),
mtf2h(0),mtf2l(0),mtf2o(0),mtf2c(0),mtf2pvt(0),diff2(0),
mtf3h(0),mtf3l(0),mtf3o(0),mtf3c(0),mtf3pvt(0),diff3(0),
mtf4h(0),mtf4l(0),mtf4o(0),mtf4c(0),mtf4pvt(0),diff4(0),
mtf0pvt(0),diff0(0);
If barNumber > 1 then
Begin
mtf0pvt = (close + high + low) / 3;
diff0 = close - mtf0pvt;
mtf1h = highest(h,tf1Mult);
mtf1l = lowest(l,tf1Mult);
mtf1c = close;
mtf1pvt = (mtf1h+mtf1l+mtf1c) / 3;
diff1 = mtf1c - mtf1pvt;
mtf2h = highest(h,tf2Mult);
mtf2l = lowest(l,tf2Mult);
mtf2c = close;
mtf2pvt = (mtf2h+mtf2l+mtf2c) / 3;
diff2 = mtf2c - mtf2pvt;
mtf3h = highest(h,tf3Mult);
mtf3l = lowest(l,tf3Mult);
mtf3c = close;
mtf3pvt = (mtf3h+mtf3l+mtf3c) / 3;
diff3 = mtf3c - mtf3pvt;
mtf4h = highest(h,tf4Mult);
mtf4l = lowest(l,tf4Mult);
mtf4c = close;
mtf4pvt = (mtf4h+mtf4l+mtf4c) / 3;
diff4 = mtf4c - mtf4pvt;
Condition10 = diff0 > 0;
Condition11 = diff1 > 0;
Condition12 = diff2 > 0;
Condition13 = diff3 > 0;
Condition14 = diff4 > 0;
If condition10 then setPlotColor(1,Green) else SetPlotColor(1,Red);
If condition11 then setPlotColor(2,Green) else SetPlotColor(2,Red);
If condition12 then setPlotColor(3,Green) else SetPlotColor(3,Red);
If condition13 then setPlotColor(4,Green) else SetPlotColor(4,Red);
If condition14 then setPlotColor(5,Green) else SetPlotColor(5,Red);
condition6 = condition10 and condition11 and condition12 and condition13 and condition14;
Condition7 = not(condition10) and not(condition11) and not(condition12) and not(condition13) and not(condition14);
If condition6 then setPlotColor(7,Green);
If condition7 then setPlotColor(7,Red);
If condition6 or condition7 then plot7(7,"trend");
Plot6(5,"line");
Plot1(4,"t1");
Plot2(3,"t2");
Plot3(2,"t3");
Plot4(1,"t4");
Plot5(0,"t5");
end;
Hi-Res Edition Just Added to Easing Into EasyLanguage Series
Hello to All! I just published the first book in this series. It is the Foundation Edition and is designed for the new user of EasyLanguage or for those you would like to have a refresher course. There are 13 tutorials ranging from creating Strategies to PaintBars. Learn how to create your own functions or apply stops and profit objectives. Ever wanted to know how to find an inside day that is also a Narrow Range 7 (NR7?) Now you can, and the best part is you get over 4 HOURS OF VIDEO INSTRUCTION – one for each tutorial. All source code is available too, and if you have TradeStation, so are the workspaces. Plus you can always email George for any questions. george.p.pruitt@gmail.com.
This book is for those that have read the Foundation Edition or have some experience working with EasyLanguage and the various functions that help make a trading decision. This book’s audience will be those programmers that want to take an idea, that requires an observation of intraday market movements to make a trading decision, and program it accurately. If you have programmed daily bar systems, and you want to drill down and add some components that require additional market information (like what came first – the high or the low), then you have come to the right place. If you want to buy and sell short in the same day and use trade management principles such as profit targets and stop losses then The Hi-Res Edition is the book you need. There are two paradigms that EasyLanguage covers: daily and intraday bar programming. It’s the same language, but the move from daily to intraday programming can be quite difficult. Learn all the essentials and shortcuts with this edition. 5 HOURS OF VIDEO INSTRUCTION in this Hi-Res edition – one for each tutorial. All source code is available too, and if you have TradeStation, so are the workspaces. Plus you can always email George for any questions. george.p.pruitt@gmail.com.
Pick you your copies today – e-Book or Paperback format!