Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

WaitUntilFlat

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

    WaitUntilFlat

    If I want to trade the account for myself as well as enable the account for the Strategy what option I should choose ?


    Also to enable the Strategy I should simply follow below steps correct ?
    Control Center -> New -> Chart -> Strategies -> Add Strategy -> Select Account -> Enable -> Apply -> Ok
    Attached Files

    #2
    Hello futtrader,

    Thanks for your post.

    Yes, that would be the correct way to enable a strategy.

    You could attempt to manually place trades on an instrument/account combination that a strategy is running on, however, manually trading on the same instrument/account that a strategy is running on could cause the Strategy Position and Account Position to become out of sync. Strategies cannot see manually placed orders. (Strategy positions are separate from actual Account positions.)

    We recommend that if you have a strategy enabled on an account/instrument combination you do not place manual orders to that same account/instrument combination. Instead, you could consider manually submitting orders on the same instrument but a different account or on a different instrument but the same account to ensure the Strategy Position and Account Position are in sync for the strategy.

    For example, if the strategy submits a Long order you would be in a 1 Long Account Position and Strategy Position. Then, if you were to manually submit a Short order to the same instrument/account, you would end up in a flat Account Position but the Strategy Position would still read as 1 Long.

    The Start Behavior property will determine how the strategy behaves upon being enabled.

    Wait Until Flat will wait until this virtual/historical position is closed before live orders can be submitted. It ensures that the strategy starts trading live from a flat position. If you enable the strategy when the account is flat, the strategy will wait until this position calculated from historical data is closed so it is logically making trades starting from an entry signal.

    Immediately Submit automatically submits working orders from when the strategy processed historical data, and assumes the strategy position and account position are where you want it when you enable the strategy. This is typically used to have a strategy resume a position after disabling/enabling. If the strategy already had live orders running, the orders will resume with the new enablement of the strategy if they match the historically calculated orders. If the orders calculated from historical data do not match the live working orders, the live working orders will be cancelled and replaced by those calculated from historical data.

    Sync Account Positions is an additional option that has NinjaTrader submit an order to sync the account position to the position calculated by the strategy. (Not the other way around.)

    Adopt Account Position would be used if you want the strategy to inherit the Account Position upon enablement. This requires additional programming.

    See this help guide page for more information on Start Behaviors: https://ninjatrader.com/support/help..._positions.htm

    See this help guide for more information about Strategy Position vs Account Position: https://ninjatrader.com/support/help...​​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Originally posted by NinjaTrader_BrandonH View Post
      Hello futtrader,

      Thanks for your post.

      Yes, that would be the correct way to enable a strategy.

      You could attempt to manually place trades on an instrument/account combination that a strategy is running on, however, manually trading on the same instrument/account that a strategy is running on could cause the Strategy Position and Account Position to become out of sync. Strategies cannot see manually placed orders. (Strategy positions are separate from actual Account positions.)

      We recommend that if you have a strategy enabled on an account/instrument combination you do not place manual orders to that same account/instrument combination. Instead, you could consider manually submitting orders on the same instrument but a different account or on a different instrument but the same account to ensure the Strategy Position and Account Position are in sync for the strategy.

      For example, if the strategy submits a Long order you would be in a 1 Long Account Position and Strategy Position. Then, if you were to manually submit a Short order to the same instrument/account, you would end up in a flat Account Position but the Strategy Position would still read as 1 Long.

      The Start Behavior property will determine how the strategy behaves upon being enabled.

      Wait Until Flat will wait until this virtual/historical position is closed before live orders can be submitted. It ensures that the strategy starts trading live from a flat position. If you enable the strategy when the account is flat, the strategy will wait until this position calculated from historical data is closed so it is logically making trades starting from an entry signal.

      Immediately Submit automatically submits working orders from when the strategy processed historical data, and assumes the strategy position and account position are where you want it when you enable the strategy. This is typically used to have a strategy resume a position after disabling/enabling. If the strategy already had live orders running, the orders will resume with the new enablement of the strategy if they match the historically calculated orders. If the orders calculated from historical data do not match the live working orders, the live working orders will be cancelled and replaced by those calculated from historical data.

      Sync Account Positions is an additional option that has NinjaTrader submit an order to sync the account position to the position calculated by the strategy. (Not the other way around.)

      Adopt Account Position would be used if you want the strategy to inherit the Account Position upon enablement. This requires additional programming.

      See this help guide page for more information on Start Behaviors: https://ninjatrader.com/support/help..._positions.htm

      See this help guide for more information about Strategy Position vs Account Position: https://ninjatrader.com/support/help...​​

      thank you for your response. I am still confused with the following Chart, May be I can test on Next crossover but as I am going long and short based on the Crossover, My Strategy always have one Position open - so my question is selecting WaitUntilFlat is appropriate or I need to select different option.

      Attached Files

      Comment


        #4
        Hello futtrader,

        Thanks for your notes.

        Yes, you could enable your strategy using the Wait Until Flat start behavior setting.

        This means that the strategy will wait until a virtual/historical position is closed if one is calculated before live orders can be submitted. It ensures that the strategy starts trading live from a flat position. If you enable the strategy when the account is flat, the strategy will wait until this position calculated from historical data is closed so it is logically making trades starting from an entry signal.

        Note that when a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.)

        This help guide documentation details the different Start Behavior settings available and how they function: https://ninjatrader.com/support/help..._positions.htm
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Originally posted by NinjaTrader_BrandonH View Post
          Hello futtrader,

          Thanks for your notes.

          Yes, you could enable your strategy using the Wait Until Flat start behavior setting.

          This means that the strategy will wait until a virtual/historical position is closed if one is calculated before live orders can be submitted. It ensures that the strategy starts trading live from a flat position. If you enable the strategy when the account is flat, the strategy will wait until this position calculated from historical data is closed so it is logically making trades starting from an entry signal.

          Note that when a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.)

          This help guide documentation details the different Start Behavior settings available and how they function: https://ninjatrader.com/support/help..._positions.htm
          thank you Brandon. Let me try.
          Also this link is not working: https://ninjatrader.com/support/help..._positions.htm

          Does phone support available for this kind of question ?

          Comment


            #6
            Hello futtrader,

            Thanks for your notes.

            See the 'Syncing Account Positions' section of this help guide page:


            Typically, with NinjaScript related items, we find that working through email is best for our NinjaScript Support. This gives our Support team time to research and test your inquiry to ensure we have the best information available for you.

            Note that we cannot provide one on one educational services for NinjaScript over the phone.

            Through email we are able to provide example code snippets, attach example scripts and link to samples on the forum, and provide educational resources such as videos and links in our help guide.

            We also cannot debug or modify a script on your behalf and we cannot assist with debugging over the phone. This means that if we are on the phone, if you have questions about the logic of a script, we would need to end the call and assist with the debugging process through email.

            Through email, we can assist by demonstrating how to use TraceOrders, prints, comments, and the output window to understand the behavior of a script, and assist with analyzing the output from your script and provide insight about the specific behavior of your inquiry.

            Over the phone, we can answer general questions about NinjaScript methods and properties documented in the help guide, but we cannot assist debugging a specific script or creating/modifying the logic of a script.​​​
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              Originally posted by NinjaTrader_BrandonH View Post
              Hello futtrader,

              Thanks for your notes.

              See the 'Syncing Account Positions' section of this help guide page:
              https://ninjatrader.com/support/help...strategies.htm

              Typically, with NinjaScript related items, we find that working through email is best for our NinjaScript Support. This gives our Support team time to research and test your inquiry to ensure we have the best information available for you.

              Note that we cannot provide one on one educational services for NinjaScript over the phone.

              Through email we are able to provide example code snippets, attach example scripts and link to samples on the forum, and provide educational resources such as videos and links in our help guide.

              We also cannot debug or modify a script on your behalf and we cannot assist with debugging over the phone. This means that if we are on the phone, if you have questions about the logic of a script, we would need to end the call and assist with the debugging process through email.

              Through email, we can assist by demonstrating how to use TraceOrders, prints, comments, and the output window to understand the behavior of a script, and assist with analyzing the output from your script and provide insight about the specific behavior of your inquiry.

              Over the phone, we can answer general questions about NinjaScript methods and properties documented in the help guide, but we cannot assist debugging a specific script or creating/modifying the logic of a script.​​​

              thank you for clarifying.

              May I know the Phone number (and extension if any) for general questions about NinjaScript methods and properties documented in the help guide ?

              Also while enable strategy in Chart,

              I can change the time interval from 1 Min to 5 Min - and I can see my strategy in not disable -Just to make sure it'll continue to run and just evaluate the indicator based on the selected time interval.

              But in Strategy Tab, I notice to change the time interval - I need to first disable the Strategy and then update the Time Interval but that is not the case while running Strategy from the chart.
              Last edited by futtrader; 12-13-2023, 12:11 PM.

              Comment


                #8
                Hello futtrader,

                Thanks for your notes.

                You could email support[at]ninjatrader[dot]com with your question and request a call and we would then schedule a call if your question is related to general questions about NinjaScript method or properties documented in the help guide.

                When a strategy is running on a chart, the strategy changes to the interval that the chart is set to and will continue to run after changing chart intervals. You could see this by noting the Strategies tab of the Control Center when changing chart intervals. The 'Data series' column in the Strategies tab of the Control Center will reflect the interval the strategy is running on and the 'Enabled' checkbox will be checked to confirm the strategy is enabled.

                When a strategy is running from the Strategies tab of the Control Center instead of from a chart, you would need to disable the strategy by unchecking the 'Enabled' checkbox, right-click on the strategy, select 'Edit strategy', change the data series interval you want the strategy to use, and then re-enable the strategy.

                Here are some help guide links for more information about enabling a strategy.

                Enabling a Strategy from the Control Center — https://ninjatrader.com/support/helpGuides/nt8/running_a_ninjascript_strateg2.htm

                Enabling a Strategy in a Chart window — https://ninjatrader.com/support/helpGuides/nt8/running_a_ninjascript_strategy.htm
                <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                56 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                133 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                73 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                45 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                49 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X