Demarker cross over moving average

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #202091 quote
    MaryMary
    Participant
    Average

    How do you write a screener where you want Demarker Indicator period 3 to cross over Exponential Moving Average period 3  ?

    Thank you in advance.

    #202100 quote
    JSJS
    Participant
    Master

    Hi @Mary

    DeMarker is an indicator with a ratio between 0 and 100 (equal to the RSI).

    EMA is an indicator with a value based on price.

    So, you can’t compare the two… (DeMarker can’t cross over an EMA)

    Or do I misunderstand your question?

    #202121 quote
    MaryMary
    Participant
    Average
    So I have this Demarker Indicator on my chart (please see code below) and I added an Exponential Moving Average  period (3) to it so it crosses over( see pic below). I just don’t know how to write a screener for it.   //DeMarker Indicator period=3 up=max(0,high-high[1]) down=max(0,low[1]-low) ratio=100*average[period](up)/(average[period](up)+average[period](down)) return ratio as “DeMarker”,20,80
    DEMARKER-CROSS-EMA3.jpg DEMARKER-CROSS-EMA3.jpg
    #202123 quote
    JSJS
    Participant
    Master

    Hi @Mary

    Okay, I understand now…

    The screener can look like this…

     
    //DeMarker + EMA Screener
    
    period=3
    up=max(0,high-high[1])
    down=max(0,low[1]-low)
    
    ratio=100*average[period](up)/(average[period](up)+average[period](down))
    xEMA = ExponentialAverage[period](Ratio)
    
    If ratio Crosses Over xEMA then
    Signal = 1
    Else
    Signal = 2
    EndIf
    
    SCREENER[Signal](Signal AS "1=long, 2=short")
    Mary thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

Demarker cross over moving average


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Mary @mila Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by JSJS
3 years, 11 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/08/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...