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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 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