Comparing the difference in 2 EMAs over time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #178675 quote
    egyptiantraderegyptiantrader
    Participant
    Junior

    Hello all.

    I’m trying to compare the value of the difference between 2 EMAs once each day just after market open and  going back and checking the previous 2 candles to see if it’s growing or shrinking.

    Is this correct? And how can I check it’s executing correctly?

    emadiff = ExponentialAverage[20](Close)- ExponentialAverage[50](Close)

    IF Time = 143500 then
    C5 = (emadiff>emadiff[1] AND emadiff[1]>emadiff[2])
    C6 = (emadiff<emadiff[1] AND emadiff[1]<emadiff[2])
    Endif

    Thanks.

    #178679 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Yes, that’s correct.

    You can use RETURN emadiff, then check yourself on your screen.

    egyptiantrader thanked this post
    #178682 quote
    egyptiantraderegyptiantrader
    Participant
    Junior

    Thank you once again. 🙂

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

Comparing the difference in 2 EMAs over time


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by egyptiantraderegyptiantrader
5 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/28/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...