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
Unmanged order strategy is not executing the same on live account
Collapse
X
-
Unmanged order strategy is not executing the same on live account
Unmanged order strategy on the sim it works fine but on live it doesnt put stop loss and profit target like it does on the sim. Was wondering what was this about im guess it has to do with unmanged approach. How do I fix this issue?Tags: None
-
Hello rickyblah12,
From the given details I wouldn't be able to say that unmanaged is specifically the reason. This would be a situation where you would need to look at the logic you made and see what worked differently in those two use cases. Without that detail I couldn't really provide any suggestions.
To debug this you would need to run the script in both use cases and add some form of output like a Print to determine whats not working. Once you isolate what was not working we could look at that logic and try to find how to solve that.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
-
Hello rickyblah12,
You will need to determine that based on what you created.
You said that the targets were affected so that logic may be a good starting place.
If the targets don't work and you are doing something to trigger the targets in OnBarUpdate the print would need to go in your OBU logic. If you are using the order events like OnOrderUpdate or OnExecutionUpdate you could start there. If you use these events you may also want to read the warnings surrounding those overrides as not all providers treat order events equally. https://ninjatrader.com/support/help...ub=onexecution
The print could be anything from just text to variables you used in your logic, that will depend on your exploration and what part of the script needs to be debugged.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
This is what I have on the output window. What should I be looking for?
10/5/2020 12:06:00 PM Strategy ' xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:06:00 PM: BarsInProgress=0 Action=Buy OrderType=Market Quantity=3 LimitPrice=0 StopPrice=0 SignalName='Long'
10/5/2020 12:06:00 PM Strategy ' xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:06:00 PM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=3 LimitPrice=0 StopPrice=11410.25 SignalName='Stop Long'
10/5/2020 12:06:00 PM Strategy ' xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:06:00 PM: BarsInProgress=0 Action=Sell OrderType=Limit Quantity=1 LimitPrice=11446.50 StopPrice=0 SignalName='Profit Long 1'
10/5/2020 12:06:00 PM Strategy 'xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:06:00 PM: BarsInProgress=0 Action=Sell OrderType=Limit Quantity=2 LimitPrice=11452.75 StopPrice=0 SignalName='Profit Long 2'
10/5/2020 12:22:00 PM Strategy ' xxxxxx': Cancelled custom managed order: orderId='NT-00308-6896' account='phillip' name='Stop Long' orderState=Working instrument='NQ 12-20' orderAction=Sell orderType='Stop Market' limitPrice=0 stopPrice=11410.25 quantity=3 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-10-05 12:06:00' gtd='2099-12-01' statementDate='2020-10-07'
10/5/2020 12:22:00 PM Strategy 'xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:22:00 PM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=2 LimitPrice=0 StopPrice=11410.25 SignalName='Stop Long'
10/5/2020 12:24:00 PM Strategy ' xxxxxx': Cancelled custom managed order: orderId='NT-00311-6896' account='phillip' name='Stop Long' orderState=Working instrument='NQ 12-20' orderAction=Sell orderType='Stop Market' limitPrice=0 stopPrice=11410.25 quantity=2 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-10-05 12:22:00' gtd='2099-12-01' statementDate='2020-10-07'
10/5/2020 12:24:00 PM Strategy 'xxxxxx': Entered internal SubmitOrderUnmanaged() method at 10/5/2020 12:24:00 PM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=2 LimitPrice=0 StopPrice=11430.25 SignalName='Stop Long'
10/5/2020 1:20:00 PM Strategy 'xxxxxx': Cancelled custom managed order: orderId='NT-00310-6896' account='phillip' name='Profit Long 2' orderState=Working instrument='NQ 12-20' orderAction=Sell orderType='Limit' limitPrice=11452.75 stopPrice=0 quantity=2 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2020-10-05 12:06:00' gtd='2099-12-01' statementDate
Comment
-
Hello rickyblah12,
Is this something you are printing or you just noticed the order events were being output? The strategy will make some output when it has order events.
From the given details it looks like the strategy is submitting orders and also cancelling some orders. I couldn't really say much else given only the output.
Do you have logic to cancel orders?
You also mentioned that you are using unmanaged but the note is mentioning managed orders being cancelled. Did you accidentally mix the managed and unmanaged approach? If so they cannot be combined and that may be part of the problem.
I look forward to being of further assistance.
JesseNinjaTrader Customer Service
Comment
-
there is cancel order logic but yes it is unmanged = true.
where should I put the print exactly in the cancel order bracket or the execution bracket?
Comment
-
Hello rickyblah12,
I understand that you set unmanaged to true, but are you still trying to use any managed type of orders in your strategy? When using unmanaged you can only create orders using SubmitOrderUnmanaged, are you doing that for all orders?
where should I put the print exactly in the cancel order bracket or the execution bracket?
You need to research your code and see what is not happening that would otherwise normally happen when you run it on sim. A print can help to determine if your logic is working differently. If you instead see the cancel as the reason its working different you would likely need to focus on what orders were being submitted or the cancellation logic. With that I would need to see what logic was used to better understand what may have happened.
Please let me know if I may be of additional assistance.
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kujista, Today, 06:23 AM
|
5 responses
15 views
0 likes
|
Last Post
by kujista
Today, 10:26 AM
|
||
Started by f.saeidi, Today, 10:19 AM
|
0 responses
4 views
0 likes
|
Last Post
by f.saeidi
Today, 10:19 AM
|
||
Started by traderqz, Yesterday, 09:06 AM
|
2 responses
16 views
0 likes
|
Last Post
by traderqz
Today, 09:48 AM
|
||
Started by traderqz, Today, 12:06 AM
|
3 responses
6 views
0 likes
|
Last Post Today, 09:41 AM | ||
Started by RideMe, 04-07-2024, 04:54 PM
|
5 responses
28 views
0 likes
|
Last Post Today, 08:48 AM |
Comment