Code required to reference

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #183456 quote
    Forever beginnerForever beginner
    Participant
    New

    Is there a Code to extract the value of the n-th Before n-rod exponential moving average?

    #183458 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Hello,

    I am not sure of translation of n-rod, but if you mean accessing value of an exponential moving average at previous n-th candle starting from current one being number zero (previous one being 1 ago, before that is 2 ago etc…) then just add n in square brackets [n] like this:

    period= ...
    n= ...
    ExponentialAverage[period](close)[n]

    or also you can use a variable to store the average and call back its n-th value:

    period= ...
    n= ...
    myEMA= ExponentialAverage[period](close)
    myEMAnAGO= myEMA[n]
    #183483 quote
    Forever beginnerForever beginner
    Participant
    New

    Thank you for your reply
    I’ll try

    #183484 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    @Forever beginner

    Do not embed html code in your post, just use plain text.

    Thank you 🙂

Viewing 4 posts - 1 through 4 (of 4 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

Code required to reference


Platform Support: Charts, Data & Broker Setup

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
4 years, 9 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 12/16/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...