Coding error on ProRealTime

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #210864 quote
    flydragonflydragon
    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_BywanJC_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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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_BywanJC_Bywan
3 years, 7 months ago.

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