Translated with www.DeepL.com/Translator (free version)
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
Questions regarding starting ATM strategy from NinjaScript and quantity entry issue
Collapse
X
-
Questions regarding starting ATM strategy from NinjaScript and quantity entry issue
Good morning. Two questions: 1) Is there a video tutorial about how to link ATM strategy from another strategy?2) I have generated a strategy without stop and without profit target. This is how it is executed and gets me into the market correctly. Once inside, for example Long, I introduce a Sell Stop as stop loss and a Sell Limit as profit target, both without any ATM strategy. That way I can manually manage the strategy. If it reaches the profit target, it is executed correctly, and I remove the other sell order that I had entered as stop loss. On the contrary, if the operation is stop, I manually remove the sell order I had set as profit target. Until then, everything is correct. But when the strategy executes the next trade, it enters TWO contracts instead of ONE. And the next time THREE and the next time FOUR, and so on. Why does this happen? How is it solved? Thank you.
Translated with www.DeepL.com/Translator (free version)Tags: None
-
Welcome to the forums tradesouth!
I have moved this post to a new thread as the thread you replied to was getting close to being a year old and you have some new questions that constitute a new thread. Please be sure to open new threads with new inquires so it can help to make the forum more browse-able for others to spot a thread that is related to issues or questions that they may be facing.
More information on using the forum can be found here - https://ninjatrader.com/support/forum/help
1) Is there a video tutorial about how to link ATM strategy from another strategy?
ATM strategies also must be initiated with realtime data and cannot be backtested in the Strategy Analyzer. You could use the Playback Connection to test these strategies against realtime data, however.
Using ATM Strategies — https://ninjatrader.com/support/help...strategies.htm
ATM Strategy Methods — https://ninjatrader.com/support/help...gy_methods.htm
Playback — https://ninjatrader.com/support/help...connection.htm
2) I have generated a strategy without stop and without profit target. This is how it is executed and gets me into the market correctly. Once inside, for example Long, I introduce a Sell Stop as stop loss and a Sell Limit as profit target, both without any ATM strategy. That way I can manually manage the strategy. If it reaches the profit target, it is executed correctly, and I remove the other sell order that I had entered as stop loss. On the contrary, if the operation is stop, I manually remove the sell order I had set as profit target. Until then, everything is correct. But when the strategy executes the next trade, it enters TWO contracts instead of ONE. And the next time THREE and the next time FOUR, and so on. Why does this happen? How is it solved? Thank you.
1. Use the Playback Connection to be able to reproduce the issue in a consistent manner
2. Add debugging prints before each order submission to observe a) Quantity submitted with each order b) when each order method gets called
You can then review the output and see which order methods have opened each position and the quantity used with each order submission. This will help to identify if additional order methods are being fired, or if your logic is submitting orders with increasing quantity.
Debugging Tips - https://ninjatrader.com/support/help...script_cod.htm
Debugging in the Strategy Builder - https://drive.google.com/file/d/1mTq...w?usp=drivesdk
We look forward to assisting.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by goodknight777, Today, 08:43 AM
|
1 response
5 views
0 likes
|
Last Post Today, 09:25 AM | ||
Started by kramnor2001, Yesterday, 02:30 PM
|
3 responses
21 views
0 likes
|
Last Post
by kramnor2001
Today, 09:20 AM
|
||
Started by ninza33, Today, 09:10 AM
|
0 responses
6 views
0 likes
|
Last Post
by ninza33
Today, 09:10 AM
|
||
Started by Padan, Today, 02:02 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 08:54 AM | ||
Started by Tim-c, Today, 08:36 AM
|
1 response
3 views
0 likes
|
Last Post Today, 08:45 AM |
Comment