Demarker cross over moving average

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #202091 quote
    Mary
    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
    JS
    Participant
    Veteran

    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
    Mary
    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
    JS
    Participant
    Veteran

    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.

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

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