Announcement

Collapse
No announcement yet.

ADX increasing increment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ADX increasing increment

    Hi all,
    I am working on a study that will change the color of a non price moving average if the adx increases by more than x from the last bar. How do I express one bar ago? I tried the easylanguage, [1] and that didn't work. Do I make an array and then pop the last bar? Any help would be greatly appreciated.

    Thanks,
    Chris

  • #2
    Chris
    I assume you are using the builtin ADX.
    In that case if for example you declare the ADX study as vADX then the current bar will be vADX.getValue(ADXDMStudy.ADX) and the value of one bar ago will be vADX.getValue(ADXDMStudy.ADX,-1), two bars ago will be vADX.getValue(ADXDMStudy.ADX,-2) etc.
    Alex

    Comment

    Working...
    X