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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
50 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
16 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
23 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment