Coding error on ProRealTime

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #210864 quote
    flydragon
    Participant
    New

    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 quote
    JC_Bywan
    Moderator
    Master

    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)
  • You must be logged in to reply to this topic.

Coding error on ProRealTime


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
flydragon @flydragon Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JC_Bywan
2 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/04/2023
Status: Active
Attachments: No files
Logo Logo
Loading...