Thursday, November 13, 2008

Previous day's HLC for Index Futures


What this study will do is that it will chart the high, low and close for previous trading day for the Index Futures that close at 3:15pm CT, reopen at 3:30pm CT, close at 4:30pm CT and reopen at 5:00pm CT.

The study's inputs are start & time. The START input allows you to set the opening time of the index future, i.e. 3:30pm CT (remember that it is in Eastern Time and it written using a 24 syntax, i.e. 1630 for 4:30pm ET).

The time input allows you to control the time aggregation you are using on the chart as the study is specific to the time aggregation you are using. Thus, if you are looking at 5 minute bars, you will enter 5 as the Time input, if you are using 15 minute bars, you will use 15 in the time input.

Please note that this will ONLY work with index futures that close close at 3:15pm CT, reopen at 3:30pm CT, close at 4:30pm CT and reopen at 5:00pm CT, i.e. /ES, /NQ, /YM, etc..

Picture will come shortly...

!!!!!!!!!!!!!!!!!! FOR EDUCATIONAL PURPOSES ONLY! !!!!!!!!!!!!!!!!!!!!!!

input start = 1630;

input time = 15;

rec begin_high = if(secondsTillTime(start) == 0, Highest(high, ((1395 / time))), begin_high[1]);

rec begin_low = if(secondsTillTime(start) == 0, lowest(low, ((1395 / time))), begin_low[1]);

rec begin_close = if(secondsTillTime(start) == 0, close[1], begin_close[1]);

plot highest = if(begin_high == 0, double.nan, begin_high);

highest.setdefaultcolor(color.orange);

plot lowest = if(begin_low == 0, double.nan, begin_low);

lowest.setdefaultcolor(color.light_red);

plot end = if(begin_close == 0, double.nan, begin_close);

end.setdefaultcolor(color.dark_gray);




No comments: