Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder

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

    Strategy Builder

    Hello
    Is there away or condition to make a strategy take Long position then only Take short position after and not take two consecutive positions on same type ?

    I appreciate your help and efforts

    Thank you

    #2
    Hello bofygym7, thanks for writing in.

    In the strategy builder, you can check the current market position of the strategy. You can also add a boolean variable to the script in the Inputs and variables section and add it in as a part of the trade condition so that it only triggers once. e.g.

    if(MyBoolean && <conditions to trade>)
    {
    //go long
    MyBoolean = false; // set to false, then reset to true when ready to go long again
    }

    How exactly you add it depends on the entry conditions of your strategy/ how your strategy is designed. Please see this example we have on checking the market position:

    https://ninjatrader.com/support/help...ionComparisons

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 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