Screener close to SMA percentage

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #97769 quote
    marcara
    Participant
    Average
    Timeframe (daily)
    
    SMA200 = Average[200](close)
    
    Timeframe (default)
    percent = 0.2  // modificar segun criterio
    a = (ABS(high - SMA200))/ Close  < (percent/100)
    b = (ABS(low - SMA200))/ Close  < (percent/100)
    
    SCREENER [a or b]

    Hi,

     

    I am triing to have an screener that indicates when the SMA200 daily is close in percetage to the actual price.

    I tried the code above bu in some cases is not working well.

    Thans in advance

    #97770 quote
    robertogozzi
    Moderator
    Master

    Try this one (not tested):

    Timeframe (daily)
    SMA200 = Average[200](close)
    Timeframe (default)
    PerCent = 0.2
    Close2Sma200 =  ABS(1 - (close / SMA200)) * 100
    SCREENER[Close2Sma200 <= PerCent]
    marcara thanked this post
    #97771 quote
    marcara
    Participant
    Average

    Thanks Roberto,

     

    I tried (I think the difference is you ckeck he close and I check the low and the high) and It seems that It is ok but sometime it is no working properly.

    For instance, check EURDKK, It is not close but both screeners give as a result the EURDKK, very strange.

     

    Thanks in advance

    #97772 quote
    robertogozzi
    Moderator
    Master

    EURDKK is fine, close is currently above SMA200 a bit less than 0.2%.

    If you want to use HIGH or LOW, just replace CLOSE at line 5.

    #97774 quote
    marcara
    Participant
    Average

    Hi,

     

    Many thanks, yo are right.  It is working fine, my mistake, sorry.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Screener close to SMA percentage


ProScreener support

New Reply
Author
author-avatar
marcara @marcara Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by marcara
6 years, 8 months ago.

Topic Details
Forum: ProScreener support
Language: English
Started: 05/06/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...