Coding error on ProRealTime

Forums ProRealTime English forum ProBuilder support Coding error on ProRealTime

Viewing 2 posts - 1 through 2 (of 2 total)
  • #210864

    Hi Guys, Good day to all.

    Error appear on “MACD”& “Signal” line indicate on ProRealTime code. Can anyone assist please.

    Quote

    // Impulse MACD Indicator

    FastLength = 12
    SlowLength = 26
    SignalLength = 9
    SmoothLength = 2
    MACD = 0.0 (Error appeared)
    Signal = 0.0 (Error appeared)
    Impulse = 0.0

    // Define indicator function
    Function ImpulseMACD()
    EMA1 = ExpAverage(FastLength, close)
    EMA2 = ExpAverage(SlowLength, close)
    MACD = EMA1 – EMA2

    Signal = ExpAverage(SignalLength, MACD)

    Impulse = Average(SmoothLength, MACD – Signal)

    // Plot results
    Plot1(MACD, “MACD”, blue)
    Plot2(Signal, “Signal”, red)
    Plot3(Impulse, “Impulse”, green)

    // Generate buy and sell signals
    If CrossOver(MACD, Signal) Then
    Buy
    EndIf

    If CrossUnder(MACD, Signal) Then
    Sell
    EndIf
    EndFunction

    // Call indicator function
    ImpulseMACD()

    Unquote

     

    Thank you.

    #210866

    Hello, this is not the same programming language as prorealtime’s, it’s a code for another platform.

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

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