Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy trade plots, how to show real trades and not 'back trades'
Collapse
X
-
Strategy trade plots, how to show real trades and not 'back trades'
When I apply and enable a new strategy to a chart it shows trades that would have happened had the strategy been enabled. How can I show just trades that were actually executed by the strategy on the chart?Tags: None
-
Hello,
Thanks for your post and welcome to the forums!
If you want your strategy to only show/perform trades on live data you could add a check for historical data and if it is processing historical data then to return until it is no longer historical data. In the OnBarUpdate() method you could add:
if (Historical) return; // Only process live or market replay data.
Reference:
http://ninjatrader.com/support/helpG...historical.htm
-
Thank you for the reply. I think I've been able to achieve what I want by running the strategy from the Strategy tab in the Control Center. In the future if I need to do it another way I will implement the code you referenced.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 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
545 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