Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need some help debuging my first basic strategy

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

    #16
    Does the strategy make any trades at all ?

    Code:
     
    // Condition set 1
    if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), 1)
    && Close[0] < Bollinger(2, MyInput2).Lower[0])
    {
    EnterLong(DefaultQuantity, "");
    }
    After looking more into your code it seems very unlikely that the condition for a long entry will ever occur because you have a relative long period T3 crossover and a relatively fast Bollinger setting.
    If the T3 crossover occurs, there's a strong uptrend and Close[0] will in most cases be in -or- above the upper range of the Bollingerbands, and not below the lower band.

    Therefore I suggest you increase the CrossAbove lookback period to 10 or more depending on your timeframe settings.
    That way, if a crossover occurs, the code will look if Close[0] goes below the lower BollingerBand for the next 10 bars, and not only at exactly the time (ie. the same bar) the crossover occurs.

    like this:

    Code:
     
    if (CrossAbove(T3(MyInput0, 3, 0.7), T3(MyInput1, 3, 0.7), [B][SIZE=3][COLOR=red]10[/COLOR][/SIZE][/B])
    && Close[0] < Bollinger(2, MyInput2).Lower[0])
    {
    EnterLong(DefaultQuantity, "");
    }

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X