Trend Sequence Indicator HELP!

Forums ProRealTime English forum ProBuilder support Trend Sequence Indicator HELP!

Viewing 3 posts - 1 through 3 (of 3 total)
  • #235935

    Hi everyone,

    I’m hoping someone here can help me out. A friend of mine used AI to create an indicator for ProRealTime, but we’re running into some issues with the code. The indicator is called the “Trend Sequence Breaker (TSB)” and is supposed to identify trends and sequence breaks based on high and low points. However, we are having trouble getting it to work correctly. The indicator uses dots in different colors, to show high, lows, and breack of a sequence.

    Here’s the code we have so far:

    // Trend Sequence Breaker (TSB)
    // Function to determine the trend
    If Close > Highest(Close[1], 2) Then
    trend := 1 // Bullish Trend
    ElseIf Close < Lowest(Close[1], 2) Then trend := -1 // Bearish Trend
    Else trend := 0 // “side” Trend
    EndIf
    // Identification of max and mins
    isHigh := High = Highest(High[1], 2)
    isLow := Low = Lowest(Low[1], 2)
    // Identification of sequence breaks
    If (trend < 0 AND (High > High[1] OR Low > Low[1])) OR (trend > 0 AND (High < High[1] OR Low < Low[1])) Then
    isBreak := True
    Else isBreak := False
    EndIf
    // Drawing of the circles
    If isHigh Then DrawSymbol(High, “circle”, RGB(255, 165, 0)) // Orange
    EndIf
    If isLow Then DrawSymbol(Low, “circle”, RGB(0, 255, 255)) // Cyan
    EndIf
    If isBreak Then DrawSymbol(Close, “circle”, RGB(255, 0, 255)) // Magenta
    EndIf

    We are encountering some issues and the indicator doesn’t seem to be working as expected. If anyone could take a look and let me know what needs to be fixed, it would be greatly appreciated!

    Thank you in advance for your help!

    #235941

    Ciao. Estás utilizando lenguaje de otro  programa… por eso te da errores. Ecco il codice modificato:

    Hello. You are using language from another program… that’s why you get errors. Here is the modified code:

    #235945

    @Joshi

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums. Thanks 🙂

    I moved it from the Italian forum.

     

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login