Automatically placed orders issues when ninjatrader is turned off.
I'm learning how to programm on ninja, so i managed to make the script which sets orders (EP/SL/TP) automatically. It does that, but whenever I turn off ninja and turn it back on these orders become inactive, their status changes to "PendingCancel" and they become red-colored both on the chart and on the orders tab. Moreover, they become non-affected by price movements. Can anyone plz explain where does this problem arise from and how it can be fixed?
Also, could anyone suggest where I can find good code templates to study on? I'm interested not in particular strategies, but rather in the code which is similar to every strategy - order placement, order handling, debugging and handling non-standart situations (e.g. unexpected ninja shutdown, after which the strategy stops working)
This post has been selected as an answer to the original posters question
Tons of examples in the Elite Automated Trading section of futures.io (formerly BMT), and also a lot in the Battle of the Bots thread.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.