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 samir, Today, 07:00 PM
    0 responses
    9 views
    0 likes
    Last Post samir
    by samir
     
    Started by travisloneker, Today, 06:52 PM
    0 responses
    6 views
    0 likes
    Last Post travisloneker  
    Started by InfraredBusa, Today, 05:50 PM
    0 responses
    3 views
    0 likes
    Last Post InfraredBusa  
    Started by White Fork, Today, 04:56 PM
    1 response
    8 views
    0 likes
    Last Post White Fork  
    Started by steveyinyang, Today, 02:48 PM
    3 responses
    20 views
    0 likes
    Last Post steveyinyang  
    Working...
    X