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

Script Start behavior

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

    Script Start behavior

    Hi there,

    When trading live and with regards to " Start Behavior ", what would be the ideal way of starting & restarting a strategy without worrying about strategy synch account.
    Let' s say :
    - The strategy script was running and due to circumstances, I exited the trade manually, before the news and I would like to restart the strategy after the news as if I am starting my a new day.
    - There was a power outage, I closed the position and would like to start trading again after..

    Under " start behavior" what would I need to select without the historical data and no need to synch account and making sure in live trading only new trades will be submitted..

    Thanks.
    Adiano.

    #2
    Hello Adiano,

    Thanks for the post.

    "Wait until flat" will not submit orders to your live account until the strategy exits its "virtual trade". "Adopt account position" will disregard the virtual strategy position. Note the additional "IsAdoptAccountPositionAware = true;" and the additional strategy logic considerations while using "Adopt account position".

    https://ninjatrader.com/support/help..._positions.htm - Syncing account positions.
    https://ninjatrader.com/support/help...itionaware.htm - IsAdoptAccountPositionAware

    If you know the account position will always be flat, and you do not want to synchronize the account position with the strategy position, then the behavior to use would be "Wait until flat" if you want the strategy to complete its virtual trade or "Adopt account position" if you want to disregard the strategies virtual position.

    Please let me know If I may assist further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you ChrisL

      Comment


        #4
        Originally posted by akitenge View Post
        Thank you ChrisL
        Hi Chris L, these are follow up questions.
        We started trading live with the script built using strategy builder.
        I have been very careful when I exit trades manually due to news etc..., before I re enable, I will make sure to go into Edit Strategy , Start behavior, I will select Wait until flat. There are times it will show L or S, turn to yellow then green and to my surprise it will initiate at L or S to continue with the virtual trade but in live. What am I not doing correctly here. This happened twice today.
        There are times, I have seen the error message : Strategy" xxx" /141399284" submitted an order that generated the following error " order rejected " Strategy has sent cancel request requests, attempted to close the position and terminate itselft. How do I prevent such error behavior?

        Thanks for your time.
        Adiano

        Comment


          #5
          Hello akitenge,

          Thanks for the reply.

          Please send me your log and trace files to me by going to Help>Email support from the NinjaTrader Control Center. Please paste the URL of this forum post in the body of the email.

          Please also include the two times where the strategy submitted live orders where they were not expected.

          I look forward to your email.
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kujista, Today, 05:44 AM
          0 responses
          5 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by ZenCortexCLICK, Today, 04:58 AM
          0 responses
          5 views
          0 likes
          Last Post ZenCortexCLICK  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          172 responses
          2,281 views
          0 likes
          Last Post sidlercom80  
          Started by Irukandji, Yesterday, 02:53 AM
          2 responses
          18 views
          0 likes
          Last Post Irukandji  
          Started by adeelshahzad, Today, 03:54 AM
          0 responses
          8 views
          0 likes
          Last Post adeelshahzad  
          Working...
          X