Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies Status Yellow

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

    Strategies Status Yellow

    Hello I have 4 stratergies running on a sim account, one is trading the e-mini which is green and the others are yellow.

    I looked into this and I found the following:


    "Yellow highlighted "Strategy" cell indicates the strategy is waiting until it reaches a flat position to be in sync with the account position before fully starting. (Please see the options Strategies Tab section for configuration options)"

    What does this mean? How can I change to green? The market is currently open.

    #2
    Hello,

    This means that on the historical data the strategy if you had started it back then would be currently long / short. The reason why it does not go green until flat is a setting. The reason this setting exists is to keep your strategy position in sync with your account position.

    Strategy Position vs. Account Position:
    <http://www.ninjatrader-support2.com/...ead.php?t=4033>

    So it is advisable to wait until the strategy is flat or, either manually submit an order to bring the account in sync with the strategy of use one of the solutions below:

    1st solution:
    You can include the following statement in your code to avoid the strategy to be calculated on historical data.
    // Only run on real-time data
    if (Historical)
    return;
    Add the statement to the top of OnBarUpdate()
    2nd solution:
    You can set 'On starting a real-time strategy' to 'Immediately submit live working orders'.
    This option can be found at Tools-->Options-->Strategies-->NinjaScript-tab.
    3rd solution, would be submitting manual orders to sync the strategy and account positions described in the link

    Let me know if I can be of further assistance.

    Comment


      #3
      Thanks for the response, just to make sure I understand, the reason it is yellow is because the order (hypothetically) triggered some time ago before I activated the strategy, and it is currently running, and the system is waiting until it goes flat before turning it green and submitting an order?

      Originally posted by NinjaTrader_Brett View Post
      Hello,

      This means that on the historical data the strategy if you had started it back then would be currently long / short. The reason why it does not go green until flat is a setting. The reason this setting exists is to keep your strategy position in sync with your account position.

      Strategy Position vs. Account Position:
      <http://www.ninjatrader-support2.com/...ead.php?t=4033>

      So it is advisable to wait until the strategy is flat or, either manually submit an order to bring the account in sync with the strategy of use one of the solutions below:

      1st solution:
      You can include the following statement in your code to avoid the strategy to be calculated on historical data.
      // Only run on real-time data
      if (Historical)
      return;
      Add the statement to the top of OnBarUpdate()
      2nd solution:
      You can set 'On starting a real-time strategy' to 'Immediately submit live working orders'.
      This option can be found at Tools-->Options-->Strategies-->NinjaScript-tab.
      3rd solution, would be submitting manual orders to sync the strategy and account positions described in the link

      Let me know if I can be of further assistance.

      Comment


        #4
        100 Percent correct.

        Comment


          #5
          How many strategies can I have running at once? And if I log off NT would the strategy not be active any longer? If so then what if I am already in a position, would it liquidate it or would it exit the position according to the strategy?

          Comment


            #6
            Hello,

            How many strategies can I have running at once?

            There is no NinjaTrader limit to this.

            And if I log off NT would the strategy not be active any longer?

            Correct, would no longer be running.

            If so then what if I am already in a position, would it liquidate it or would it exit the position according to the strategy?

            Since its no longer running no more action is taken. The position remains open until you specifically close it or the strategy specifically closes it.

            Let me know if I can be of further assistance.

            Comment


              #7
              Since its no longer running no more action is taken. The position remains open until you specifically close it or the strategy specifically closes it.

              Just one question about this, in order for the strategy to specifically close the position I have to be logged on correct? So if I log off no action is taken including closing of open positions by the strategy until I log back on?

              Reason I ask is because I used to place automated orders with my broker and positions would close out whether I was logged on or not.

              Thanks

              Originally posted by NinjaTrader_Brett View Post
              Hello,

              How many strategies can I have running at once?

              There is no NinjaTrader limit to this.

              And if I log off NT would the strategy not be active any longer?

              Correct, would no longer be running.

              If so then what if I am already in a position, would it liquidate it or would it exit the position according to the strategy?

              Since its no longer running no more action is taken. The position remains open until you specifically close it or the strategy specifically closes it.

              Let me know if I can be of further assistance.

              Comment


                #8
                Hello,

                This would depend on the method you use and settings you use. Its always a good idea to leave NinjaTrader connected anytime your running an automated strategy to make sure everything remains on sync.

                First off you need to goto Control Center->Tools->Options->Strategies Tab-> NinjaScript Tab-> Order Handling sections and uncheck these which will cause thes orders to remain when the strategy is disabled/you log off.

                However, if you place a stop order or a limit order these orders will remain in the market as long as your broker submits these orders to the market.

                Where do orders reside:
                Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state &quot;Accepted&quot; or &quot;Working&quot; are at the exchange. If the exchange does not support a specific order type, the



                However if your not using this method in your strategy and instead using ExitShort() this does not submit a stop order to the market therefor if you are logged off no ExitShort() will get called and no market order toe exit a long position will be generated.

                Let me know if I can be of further assistance.

                Comment


                  #9
                  Okay thanks
                  Originally posted by NinjaTrader_Brett View Post
                  Hello,

                  This would depend on the method you use and settings you use. Its always a good idea to leave NinjaTrader connected anytime your running an automated strategy to make sure everything remains on sync.

                  First off you need to goto Control Center->Tools->Options->Strategies Tab-> NinjaScript Tab-> Order Handling sections and uncheck these which will cause thes orders to remain when the strategy is disabled/you log off.

                  However, if you place a stop order or a limit order these orders will remain in the market as long as your broker submits these orders to the market.

                  Where do orders reside:
                  Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state &quot;Accepted&quot; or &quot;Working&quot; are at the exchange. If the exchange does not support a specific order type, the



                  However if your not using this method in your strategy and instead using ExitShort() this does not submit a stop order to the market therefor if you are logged off no ExitShort() will get called and no market order toe exit a long position will be generated.

                  Let me know if I can be of further assistance.

                  Comment


                    #10
                    Regarding the exit on close, some days the market closes at around 1:00 est instead of 4:00 does the system know to exit early during these days?

                    Also I ran a backtest on approximately 3,000 stocks then I took 10 of those 3,000 and ran the same test with different results. Why did this happen?

                    Comment


                      #11
                      Hello,

                      Thanks for the note.

                      The exit on close time is based on the session template.So if you have your session template setup correctly it will exit at the correct time.

                      Also, this would not occur if you have the same settings in use. If you believe it did occur verify all settings are correct including session template and then also, please send me screenshot of the settings used for both tests and the test results.

                      To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.


                      I look forward to assisting you further.

                      Comment


                        #12
                        The trades having different results was an error on my part.

                        What is the correct setting for my order to close properly during holiday hours?


                        Originally posted by NinjaTrader_Brett View Post
                        Hello,

                        Thanks for the note.

                        The exit on close time is based on the session template.So if you have your session template setup correctly it will exit at the correct time.

                        Also, this would not occur if you have the same settings in use. If you believe it did occur verify all settings are correct including session template and then also, please send me screenshot of the settings used for both tests and the test results.

                        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.


                        I look forward to assisting you further.

                        Comment


                          #13
                          You would need to adjust the session template end time for the holiday hours for your affected market...or you enter a high enough ExitOnClose seconds value to achieve the needed offset from the regular close time.
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            I am connected to market data but am receiving the attached message, can you tell me why this is popping up?
                            Thanks
                            Attached Files

                            Comment


                              #15
                              Please check how you setup the NOR custom instrument, is the Default and 'home' exchange checked under the master instrument setup?

                              Thanks,
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by wzgy0920, 04-20-2024, 06:09 PM
                              2 responses
                              26 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, 02-22-2024, 01:11 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, Yesterday, 09:53 PM
                              2 responses
                              49 views
                              0 likes
                              Last Post wzgy0920  
                              Started by Kensonprib, 04-28-2021, 10:11 AM
                              5 responses
                              191 views
                              0 likes
                              Last Post Hasadafa  
                              Started by GussJ, 03-04-2020, 03:11 PM
                              11 responses
                              3,233 views
                              0 likes
                              Last Post xiinteractive  
                              Working...
                              X