Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Formula step 1 then wait for step 2

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

    Formula step 1 then wait for step 2

    Hello,

    in strategybuilder I´m looking for a solution that if step 1 is true wait until step 2 is true then xy

    As example:

    STEP1 true
    if ((INDICATOR 1 <= -50)
    && (CrossAbove(RSI1.Avg, 10, 1)))

    WAIT FOR STEP2 is true
    wait for
    RSI make this

    then ....



    I hope you understood

    #2
    Hello Uregon,

    Thanks for your post.

    You could consider using a bool variable to control logic in your strategy. A bool (initially set to false) could be created in the Inputs and Variables screen of the Strategy Builder. You could create your first condition and set the bool to true. Then you would check if the bool is true in the second condition. This way, the second condition becomes true only when the bool is true. Note that you would need to create another condition and reset the bool to false somewhere in your script.

    See this help guide for more information: https://ninjatrader.com/support/help...ariablesScreen

    I am also attaching a simple example script that you may find to be helpful. The script uses a bool to control when trades are placed.

    Let us know if we may assist further.
    Attached Files
    <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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X