ema's within a certain percentage of each other

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #78027 quote
    fredfilm
    Participant
    New

    i would like to code ema percentages if possible or something similar. eg when say 5,10,20,50ema are all within a percentage of each other. Any ideas on how to do this?

    #78030 quote
    robertogozzi
    Moderator
    Master

    You can write:

    Avg1 = average[5](close)
    Avg2 = average[10](close)
    Avg3 = average[20](close)
    c1 = Avg1 > (Avg2 * 1.01) AND Avg2 > (Avg3 * 1.01)
    IF c1 THEN...

    This will set C1 when each MA is higher THAN the slower one by 1%, you can use 1.001 for 0.1% and so on.

    To check when they’re lower you need to write 0.99 for -1% or 0.999 for -0.1% and so on.

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

ema's within a certain percentage of each other


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
fredfilm @fredfilm Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
7 years, 7 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 08/12/2018
Status: Active
Attachments: No files
Logo Logo
Loading...