ema's within a certain percentage of each other

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #78027 quote
    fredfilmfredfilm
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
8 years, 1 month ago.

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