Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange end of Wizard based Strategy

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

    Strange end of Wizard based Strategy

    A Wizard based strategy with a Stoploss & Profittarget order. The stoploss and profittarget are OCO to the initial trade. I have a conditionset to exit the order under certain conditions. However this exit is taking a new trade in stead of exiting the old trade, requiring more margin than available on the account.

    When I look at the code it is:
    if ( ConditionSet2)
    EnterShort(DefaultQuantity, "SH");

    if ( ConditionSet4)
    ExitShort("SHexit", "SH");

    What could cause this to go wrong?

    #2
    clint2008, I'm not sure I follow, the ExitShort would only bring your current short position flat and not open a new one, however if you want to reverse from being long to short with 1 contract, it would need 2 contracts to accomplish that (one for the exit, one for the new position). So this could be what you see, in either case, please ensure you're synched up properly - http://www.ninjatrader-support.com/H...tPosition.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      thanks for the reply, I was hoping it would flatted my position, but its not. First I thought it was because of not stating an entrylabel, but that does not matter. Now I have the entrylabel and still on the wrong side of the market at the end. have I got any other options to investigate what is going on there? I've looked at the orders, executions and tracefile, but did not find a reason why it doesn't exit the initial trade. Could the missing DefaultQuantity on the exitshort have an effect?

      Comment


        #4
        No, if you your ExitShort would exit the complete position as referenced by your Entryname. I'd suggest working with trace orders to check the behavior of your orders - http://www.ninjatrader-support2.com/...ead.php?t=3627

        Which 'On starting a realtime strategy' option are you using under Tools > Options > Strategies > NinjaScript? - http://www.ninjatrader-support.com/H...tegiesTab.html
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Wait until flat caused the problem probably, now it is checked it didn't give me a new position. Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by PaulMohn, Today, 05:00 AM
          0 responses
          6 views
          0 likes
          Last Post PaulMohn  
          Started by ZenCortexAuCost, Today, 04:24 AM
          0 responses
          6 views
          0 likes
          Last Post ZenCortexAuCost  
          Started by ZenCortexAuCost, Today, 04:22 AM
          0 responses
          3 views
          0 likes
          Last Post ZenCortexAuCost  
          Started by SantoshXX, Today, 03:09 AM
          0 responses
          16 views
          0 likes
          Last Post SantoshXX  
          Started by DanielTynera, Today, 01:14 AM
          0 responses
          4 views
          0 likes
          Last Post DanielTynera  
          Working...
          X