Comparing the difference in 2 EMAs over time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #178675 quote
    egyptiantrader
    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
    robertogozzi
    Moderator
    Master

    Yes, that’s correct.

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

    egyptiantrader thanked this post
    #178682 quote
    egyptiantrader
    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.

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 egyptiantrader
4 years, 4 months ago.

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