So, uh, how come Add-ons cannot be backtested?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How is called the OnBarUpdate method from Indicators?
Collapse
X
-
Hello bltdavid,
Strategies are the only script designed to be back-tested and are the only scripts that have Strategy Performance.
Addons place orders directly through the Account in real-time only, and cannot place orders historically. Backtest is placing orders in State.Historical which an addon cannot do.Chelsea B.NinjaTrader Customer Service
Comment
-
I need backtesting, I'm using Neuroevolution..Originally posted by NinjaTrader_ChelseaB View PostHello Fernand0,
That is correct. NinjaTrader does not allow for backtesting addons.
Indicators called from a strategy will automatically have OnBarUpdate() triggered by NinjaTrader, you don't have to do this. We do this for you. You don't have to worry about triggering OnBarUpdate() in a called indicator.
But if you have a custom class (that is instantiated and not static) that is called by a script from OnBarUpdate(), then the strategy thread will be calling the custom class from OnBarUpdate() when NinjaTrader is triggering OnBarUpdate() in the strategy.
If you have custom events declared and custom event handlers this would be getting outside of what is supported by NinjaTrader.
Addons have Playback at least? (i don't mean to run the addon on the Playback, i mean the possibility of running a bunch of data over and over again automatically)
Comment
-
Hello Fernand0,
If you need backtesting the script should be a NinjaScript Strategy.
Addons can be run while connected to Playback.
Your own custom logic can do whatever you would like with the data. If you want to have loops that loop over data from a BarsRequest this is your choice to code this.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Fernand0,
BarsRequest is a concept for Addons. Strategies use AddDataSeries() to add data and this is processed in OnBarUpdate().
BarsRequest for addons requires a custom method event handler to process the data.
With a BarsRequest you get data. If you want to make your own system of saving entry prices and exit prices and make your own fill algorithm, your own indicators, and everything else used for optimizing, I'm sure with enough work you could replicate your own custom Strategy Analyzer to work with addons. And sure, I don't see any reason you wouldn't be able to run multiple strategies at the same time if the custom logic is sophisticated enough to do that.
NinjaTrader created the Strategy class for the intention of having a type of script that can be back-tested and optimized.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
105 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
53 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
35 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
38 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
74 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment