Code required to reference

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

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

    #183458 quote
    JC_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 beginner
    Participant
    New

    Thank you for your reply
    I’ll try

    #183484 quote
    robertogozzi
    Moderator
    Master

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

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

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