I am going to try to get some historical data today.
When it comes one thing I want to see is:
The average range of the 15 minute bars from 9:30 AM to
4:00 PM on trading days {M-F} of the ES (and maybe YM) going
back X days. Perhaps 15, let's say. This would be a program
that would be run every weekend if there was real-time data.
The code subjects below seem to be a good start. (If this
code/question has been recorded on the forum that would
be fine. I don't need to re-invent the wheel.)
The statement 'ToDay' would work but it would require the
changing of the program each week, which doesn't seem to
be the way to go.
Any suggestions on any of this matter in general would be helpful.
>>>>>>>>>>>>ToTime stuff page 614
// Only trade between 7:45 AM and 1:45 PM
if (ToTime(Time[0]) >= 74500 && ToTime(Time[0]) <= 134500)
{
// Strategy logic goes here
}
>>>>>>>>>>>ToDay stuff page 611
// Compare the date of the current bar to September 15, 2006
if (ToDay(Time[0]) > 20060915)
// Do something
>>>>>>>>>>>>Range stuff page 709
Print("The current bar's range is " + value.ToString());
// Prints the 20 period simple moving average of range
double value = SMA(Range(), 20)[0];
Print("The 20 period average of range is " + value.ToString());
Comment