SImple screener on break MM7

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #127643 quote
    LéoLéo
    Participant
    Average

    Hi All,

    I am trying to write a very simple screener that will show the break of eMM7 for Close[1]

    To avoid too many results I would like to make sure that the 5 previous closes were below th eMM7 also.

    Cf below.

    It does not work at all so I assume my entries are not correct.

    Can anyone help ?

    Thanks.

    C1= Close[1] > exponentialaverage[7](close[1]) and close[2]<exponentialaverage[7](close[2])and close[3]<exponentialaverage[7](close[3])and close[4]<exponentialaverage[7](close[4])and close[5]<exponentialaverage[7](close[5])and close[6]<exponentialaverage[7](close[6])
    C2= Close[1] < exponentialaverage[7](close[1]) and close[2]>exponentialaverage[7](close[2])and close[3]>exponentialaverage[7](close[3])and close[4]>exponentialaverage[7](close[4])and close[5]>exponentialaverage[7](close[5])and close[6]>exponentialaverage[7](close[6])
    SCREENER[C1 or C2]
    #145211 quote
    NicolasNicolas
    Keymaster
    Legend

    The below screener code should work as expected. On the current candle, the price is breaking the exponential average 7 periods while the 5 previous candlesticks Close were above or below the average.

    ema7 = exponentialaverage[7](close)
    
    signal = 0
    if close crosses over ema7 and summation[5](close<ema7)[1]=5 then 
    signal = 1
    elsif close crosses under ema7 and summation[5](close>ema7)[1]=5 then
    signal = -1
    endif 
    
    screener[signal<>0](signal as "direction")

    Bullish signal is labelled “1” and bearish is “-1” in the sorting criteria column.

    #145414 quote
    LéoLéo
    Participant
    Average

    Thank you Nicolas,

    It can also be interesting for users of PRTBands

    PRTBands = prtbandsshortterm
     
    signal = 0
    if close crosses over PRTBands and summation[5](close<PRTBands)[1]=5 then
    signal = 1
    elsif close crosses under PRTBands and summation[5](close>PRTBands)[1]=5 then
    signal = -1
    endif
     
    screener[signal<>0](signal as "direction")
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

SImple screener on break MM7


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Léo @agrassin Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by LéoLéo
6 years ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 04/23/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...