View Full Version : aligning candles at arbitrary times v7
03-03-2011, 03:36 PM
I would like to have 3hour candles but align the start time of the candle's open.
For example, I would like 3 hour candles that all start 12 minutes after the hour.
So the first candle on the chart for 3 hour bars might have its open be at say 1:12 am the next at 4:12 am the next at 7:12 am and so on.
If this is too fine granularity, then at least I would like 1/2 hour or hour alignment.
Is this possible?
03-03-2011, 03:45 PM
Thank you for your post.
This is possible, but you'll need to create a custom session template to use with these times in place. For more information about creating custom session templates: http://www.ninjatrader.com/support/helpGuides/nt7/index.html?using_the_session_manager.htm
03-06-2011, 02:15 PM
Thanks for your reply. This is an ingenious solution, I would not have though of.
Can such a custom designed a session type be then selected from within a NinjaScript auto trading strategy? I wish to incrementally shift the time frame alignment as part of the optimization task.
In this regard, It would be ok to have a series of predefined sessions, each with a different alignment that I could cycle through as part of the optimization.
03-07-2011, 07:14 AM
Yes, the custom session templates can be applied to NinjaScript strategies which should allow you to accomplish what you've described here.
03-07-2011, 09:00 AM
How is this done? can you give me a help reference?
03-07-2011, 09:04 AM
This is assigned while applying the strategy. Please see the attached image for an example.
03-07-2011, 10:13 AM
Is there any way of selecting this from within the strategy code, foe example say in initialize()?
03-07-2011, 10:27 AM
Unfortunately, no this is not possible. Only the template defined on the chart or set in strategy's run time options will apply.