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
Unhandled exception
Collapse
X
-
Hello Trino,
It is not exactly clear how you are hitting this error.
Chelsea's recommendation for accessing the Account.Orders collection involves adding a lock() to protect the code that accesses the collection to avoid this error.
Are you accessing the Account.Orders collection and hitting this error? If so, please be sure to use a lock() to protect the code that accesses the collection.
If this is not the case, could you attach a barebones example similar to the following that demonstrates how you are hitting this error?
SampleMonitorStopProfit - https://ninjatrader.com/support/help..._and_profi.htm
I look forward to being of further assistance.JimNinjaTrader Customer Service
Comment
-
I use a strategy from the Wizard. The line that produces the error while back testing is
ExitLongStopLimit(Default.Quantity, 0, 0, “”, “”);
If I comment that line out, the error disappeared.
What should be inside the brackets of the lock() command: (?)
lock() ExitLongStopLimit(Default.Quantity, 0, 0, “”, “”);
still produces the error.
Thank you for your patience.
Comment
-
Hello Trino,
Are you able to reproduce this error using a Strategy Builder created strategy that has not been unlocked?
If so, could you attach an export of this strategy with some steps that I can take to hit this error in the Strategy Analyzer?
If this is a an error that you have encountered with an unlocked strategy, could you attach a reduced version that only depicts this issue and could you also include a screenshot showing the exact context of the error you are receiving?
Please follow the instructions below to attach an exported NinjaScript strategy.
Exporting as Source Code - https://ninjatrader.com/support/help...tAsSourceFiles
Attaching a screenshot
To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.
Click here for instructions
Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
Click here for detailed instruction
I look forward to your reply.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by f.saeidi, Today, 12:14 PM
|
4 responses
11 views
0 likes
|
Last Post
by f.saeidi
Today, 01:13 PM
|
||
Started by Russ Moreland, Today, 12:54 PM
|
1 response
6 views
0 likes
|
Last Post Today, 01:01 PM | ||
Started by philmg, Today, 12:55 PM
|
1 response
7 views
0 likes
|
Last Post Today, 01:00 PM | ||
Started by TradeForge, 04-19-2024, 02:09 AM
|
2 responses
32 views
0 likes
|
Last Post
by TradeForge
Today, 12:32 PM
|
||
Started by aprilfool, 12-03-2022, 03:01 PM
|
3 responses
329 views
0 likes
|
Last Post Today, 12:31 PM |
Comment