What I do is go to strategies tab, add new strategy, change paramters and start. But it doesn't place even if the conditions are met. Is there a step I am missing in order to deploy strategies?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy doesn't execute
Collapse
X
-
Strategy doesn't execute
I have ninja trader strategy which works for backtest but when added to sim-trading doesn't place orders.
What I do is go to strategies tab, add new strategy, change paramters and start. But it doesn't place even if the conditions are met. Is there a step I am missing in order to deploy strategies?Tags: None
-
-
I can set it to false just for testing but in live if I calculate entry intrabar it might results into more trades and live results will deviate from testing.
Comment
-
it's this line here which never return true for realtime bars but does work for historical bars.
if (CrossAbove(EMA(smSeries, Period1), EMA(smSeries, Period2), 1))
Comment
-
so after debugging I found out that EMA(smSeries, Period1) and EMA(smSeries, Period2) gives different values when calculated on historical and realtime series. For realtime EMA's are much lower than what it should be. Is there a difference between how the EMA is calculated for historical bars than realtime? I changed tha Min bars to calculate to 100 but that didn't make any difference either.
Period1 is 2 and Period2 is 5.
Comment
-
I have copied the values from output window for hist and realtime EMA's
79.0258361854625
78.9966120618208
78.9588706872736
78.9436235624245
78.9665411874748
79.010180395825
79.0540601319417
79.0593533773139
26.353117792438 <<<<<<<<<<<realtime bar
8.78437259747933 <<<<<<<realtime bar
Comment
-
I will debug that and find out. But I am trying to understand what's the difference between the way OnBarUpdate is executed for historical bars and realtime bars. This might help me in future as well.
Comment
-
calculateonbarclose is set to true even then there is difference between realtime and historical values. I print the values in realtime and then I realod strategy and same bars when processed as historical print different values(correct one).
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
41 views
0 likes
|
Last Post Today, 12:28 AM | ||
Started by f.saeidi, Today, 12:12 AM
|
0 responses
3 views
0 likes
|
Last Post
by f.saeidi
Today, 12:12 AM
|
||
Started by Conall, Today, 12:06 AM
|
0 responses
5 views
0 likes
|
Last Post
by Conall
Today, 12:06 AM
|
||
Started by proptradingshop, 03-21-2024, 09:50 AM
|
6 responses
27 views
0 likes
|
Last Post Today, 12:02 AM | ||
Started by mly916, Yesterday, 09:48 PM
|
1 response
12 views
0 likes
|
Last Post Yesterday, 11:54 PM |
Comment