MACD screener code issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245360 quote
    CaldioCaldio
    Participant
    New

    Hi guys, am having issues with creating a new MACD screener, keep getting the same error message  (Line 1, Characters Missing, Suggestion: End of Code)

    code is:

    // MACD standard settings
    shortTerm = 12
    longTerm = 26
    signal = 9

    macd = exponentialaverage[shortTerm](close) – exponentialaverage[longTerm](close)
    macdSignal = exponentialaverage[signal](macd)
    hist = macd – macdSignal
    histPrev = hist[1]

    // Histogram crosses from negative to positive
    if hist > 0 and histPrev <= 0 then
    screener[0] = hist
    endif

    #245363 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Hi,

    MyHistMACD=MACD[12,26,9](close)
    crit= MyHistMACD crosses over 0
    
    screener[crit]
    Iván González thanked this post
    #245384 quote
    CaldioCaldio
    Participant
    New

    Thank You

Viewing 3 posts - 1 through 3 (of 3 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

MACD screener code issue


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Caldio @caldio Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by CaldioCaldio
1 year, 5 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/27/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...