I want to know how to control the start times of bars NT trader uses as this can have very large impacts to do with opening and closing times of markets.
My specific question relates to a strategy. Let's say in the init function we have added several data series to the strategy, for example:
Add(PeriodType.Minute, 240);
Let's also say, imported data into NT is one minute data, and imported correctly with reference timezone -5 (eastern USA).
When the strategy runs, in particular the OnBarUpdate() function, I check for which bar in particular is calling the function, eg:
if (BarsInProgress == 2) // run this for our **** minute timeframe only
{
// stuff to run for 3rd dataseries...
}
What I need to be sure of, or force NT to do somehow, is to define what the default start time of bars should be. For example, let's say for the 240 minute bars I wanted to have them starting at 0200, 0600, 1000, 1400, 1800, 2200 each day,
such that when I call the open of bar[0] each day, I would be getting the price at 0200, and the close would be the price just before the next open (say around 0559)
This is very important for the intraday timeframe bars.
thanks in advance

Comment