Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged order failing and still submitting exit orders

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unmanaged order failing and still submitting exit orders

    I wrote a bare-bones strategy as I wanted to see if I could move stop and limit orders from a Managed strategy using chart trader....

    Having some problems. It says that I don't have enough bars to trade, despite having set "BarsRequiredToTrade" to zero. I just need the strategy to open a position immediately.

    But the biggest issue, is that despite Ninjatrader failing to open the position, it submits the Stop and limit orders anyway, meaning those will enter a position when they get hit!

    It's supposed to be a managed order approach and yet cannot manage to not submit exit orders when the entry has failed?!



    HTML Code:
    Strategy 'OrdersTest/96107680': An order placed at '18/01/2017 22:01:00' has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been met.
    Enabling NinjaScript strategy 'OrdersTest/96107680' : On starting a real-time strategy - StartBehavior=ImmediatelySubmit EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=True / triggering 30 seconds before close SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes
    NinjaScript strategy 'OrdersTest/96107680' submitting order
    NinjaScript strategy 'OrdersTest/96107680' submitting order
    Attached Files

    #2
    Hello reach4thelasers, and thank you for your question.

    When I compiled and ran your strategy directly on my system, it worked without error. When I reviewed your code, however, I noticed this was a locked strategy with code manually added to it. When I loaded this code up into the strategy wizard, it erased all your existing code.

    I believe what may be occurring may be related to the hidden XML overwriting your settings, and restoring your BarsRequiredToTrade to 20.

    The easiest way to alleviate this, if you are ready to edit your code by hand, is to unlock your strategy using the "unlock code" button in the lower left. Otherwise, if you would prefer your code remain locked so that you can continue editing it through the strategy wizard, you will need to hand-edit the XML at the bottom, as well as your code, every time you make a code change.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X