Attached the code lines waiting for help thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Backtesting Error
Collapse
X
-
Backtesting Error
Hello, I'm running my strategy on backtesting but I'm getting the following error : " Object reference not set to an instance of an object ". this error its only happening on backtesting, in Realtime it works perfect. The code is not entering the loop when it does the backtest, idk why.
Attached the code lines waiting for help thanksTags: None
-
Hello Sandra73,
DrawingObjects are not drawn during a backtest.
The ChartControl will be null until after the backtest is complete.
You can check the ChartControl is not null, the DrawObjects collection is not null, the variable myReg_reingreso is not null, etc.
Unfortunately, I don't have a link for a note on this in NinjaTrader 7, but I can provide a link to the help guide on DrawObjects.
Chelsea B.NinjaTrader Customer Service
- Likes 1
-
Hello ChelseaB;
I have no idea how I can fix this. I use Region EndAnchor.Price as a re-entry price level? But Draw Collection is null on backtesting, any way to draw object or access the levels of the region(Start/EndAnchor) to take them as a reference?
I'm using NT8
Thanks
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment