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!
See more
See less

Partner 728x90

Collapse

Strategy will perform Market Order when re-enabled

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

    Strategy will perform Market Order when re-enabled

    Hello,

    I have noticed that in my strategy I submit EnterLongLimit() orders only when a certain calculation has been performed. The strategy executes perfectly when market comes near price and enters and exits very smoothly.

    However, what I have noticed is that if market is below the entry price and I re-enable the strategy after market has passed(no entry's are in) strategy will just perform a market order. This doesnt make sense to me as I have no reference to market order in my entire script. Please help


    #2
    Hello Looking for some assistance on this please
    NinjaTrader_Emily

    Comment


      #3
      Hello Shodasi99,

      Thank you for your post.

      What start behavior is your strategy using? You can check in the strategy's properties.

      I look forward to your response.
      Gaby V.NinjaTrader Customer Service

      Comment


        #4
        "immediately submit, synchronise accounts" is the start behaviour

        Comment


          #5
          Hello,

          Thank you for your response.

          If your account position does not match your strategy position after restarting the strategy, this is expected behavior with this start behavior setting.

          From the Help Guide on Immediately Submit, Synchronize Account:

          "After the strategy is successful in cancelling and submitting any orders that required action it will check your current Account Position and compare it to your Strategy Position. If the Account Position does not match your Strategy Position, NinjaTrader will submit a market order(s) to reconcile the Account Position to match your Strategy Position. The strategy will then begin managing your Strategy Position immediately."

          I encourage you to read the page below which goes into full detail how this start behavior setting works.

          HTML Code:
          https://ninjatrader.com/support/helpGuides/nt8/index.html?syncing_account_positions.htm#ImmediatelySubmitSynchronizeAccount
          If you have any further questions about it, please let me know!
          Gaby V.NinjaTrader Customer Service

          Comment


            #6
            Thank you for this information. So how do I ensure that when I enable a strategy after it has been executed that it wont re-submit? how do i make sure account position matches stratgy position when market has gone below entry value?

            Comment


              #7
              Hello Shodasi99,

              If you want to ensure that your strategy resumes the previously placed orders and positions with the 'Immediately submit' setup, you will need to ensure that the historical trades match the real time trades.​

              Please see the Help Guide page linked below goes into detail about how to accomplish this:





              Another option to reconcile your account position to match the strategy position without submitting any orders would be to could change your start behavior to Adopt Account Position.

              This setting should be used if you would like your strategy to disregard the historical virtual Strategy Position and to start in the same position as the real-world Account Position.

              Note: Adopt account position will only be available if the developer of a strategy has programmed the strategy to be aware of the real-world account position. If this setting is not available when starting your strategy, the strategy was not programmed in a manner capable of handling account positions. If you are a developer and would like your strategy to handle a real world position, please see the following article here on these properties.

              Please see the Help Guide page on Adopt Account Position for more details:



              If you have any further questions, please let us know.
              Gaby V.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by realblubb, Today, 09:28 AM
              0 responses
              2 views
              0 likes
              Last Post realblubb  
              Started by AaronKoRn, Yesterday, 09:49 PM
              1 response
              18 views
              0 likes
              Last Post Rikazkhan007  
              Started by ageeholdings, Today, 07:43 AM
              0 responses
              12 views
              0 likes
              Last Post ageeholdings  
              Started by pibrew, Today, 06:37 AM
              0 responses
              4 views
              0 likes
              Last Post pibrew
              by pibrew
               
              Started by rbeckmann05, Yesterday, 06:48 PM
              1 response
              14 views
              0 likes
              Last Post bltdavid  
              Working...
              X