im trying to backtest my strategies that run from 9:30am to 12pm. The problem I have is when I backtest for 5 day. The indicator calculate 9:30 to 12pm monday then 12pm monday to 9:30am Tuesday and on and on. I hope you guys understand my question.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
New session template
Collapse
X
-
New session template
Hello guys
im trying to backtest my strategies that run from 9:30am to 12pm. The problem I have is when I backtest for 5 day. The indicator calculate 9:30 to 12pm monday then 12pm monday to 9:30am Tuesday and on and on. I hope you guys understand my question.Tags: None
-
Hello SuperDude123,
Controlling the time range a strategy can place orders can be done with Time conditions.
Below is a link to the help guide reference sample.
https://ninjatrader.com/support/help...to_limit_t.htm
And a link to the Strategy Builder 301 training video.
https://www.youtube.com/watch?v=VxU4...XkWe0Nf&t=2529
Controlling the data that appears and can be used for calculations in NinjaScripts can be done with a custom Trading hours template.
https://ninjatrader.com/support/help...ngHourTemplateLast edited by NinjaTrader_ChelseaB; 08-30-2021, 07:11 AM.Chelsea B.NinjaTrader Customer Service
-
Thank you for reply., I did set all that up but my problem with it is, it calculate hour that I set up to like Monday 9am to 12pm then the indicators will count Monday 9 to 12 then 9 to 12 Tuesday and Wednesday 9 to 12. And it connects those timeframe together which will give you wrong indicator and ending up buying or selling at the wrong time. It need to be running on current time and the missing hours that you didn't put in.
Comment
-
Yes I did set up the trading hour with new template. But when you chop up timeframes like 9am to 4pm next day indicator will count from 4pm yesterday and missing the over night indicator which will give you wrong info.
Comment
-
Hello SuperDude123,
This is expected. The TradingHours controls the data that can be used for processing and that appears on the chart.
If you do not want to change the data, do not change the trading hours. Use <use instrument settings> if you want the full data.
Instead use time conditions in the code to trigger actions between time ranges.Chelsea B.NinjaTrader Customer Service
Comment
-
So how do I get real back testing if it give me wrong info. Basically, I want to know how did I do between 930am to 4pm. Monday to Friday. But it won't give me true indicator when the hours of night time are not factor in.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
563 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
329 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment