Correct order of moving average

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #193917 quote
    MishapMishap
    Participant
    Junior

    hi guys,

    hoping i am on the right track and looking for confirmation. essentially i want to ensure moving averages are correct in that they align smallest is higher than second and third is higher than second. basic trend following rules. is the below correct and going to give what i need?

    enter buy only if trendup = 1

    EMA7 = Average[100](close)
    EMA8 = Average[150](close)
    EMA9 = Average[250](close)
    
    if ema7>ema8 and ema8>ema9 then
    trendup=1
    else
    trendup=-1
    endif
    #193918 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Yes, that’s absolutely correct.

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

Correct order of moving average


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Mishap @mishap Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/27/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...