Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can the strategy be used for real trading?
Collapse
X
-
Can the strategy be used for real trading?
When running strategy in demo account, for example running SampleMACrossOver strategy which exists after installing NinjaTrader, it suddenly create a lot of orders which trade for history bars. It's good because it can be used for back test. But can the strategy be used for real trading? For real trading, i don't want to create any orders for history bars, only want to create order for incoming new bar or new tick. How can i know it's new bar incoming or the history bars which just need to paint when getting OnBarUpdate() call? Thanks.Tags: None
-
Hello 51friend,
You can add a statement to OnBarUpdate() that will allow the strategy to only run on live data.
if (Historical)
return;
Clicking the link above will show you where this needs to go in the code. You cannot make changes to system strategies, but you can save a copy and modify from there. Click tools > Edit NinjaScript > Strategy > SampleMACrossover. Then Right Click and Select Save As to save a copy and make changes.Ryan M.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
67 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
150 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment