moving average for nyse advance decline indicator


Category:
0
0

Hi Hahn, In the TOS platform in edit studies, one can bring on the advance/decline line for NYSE. I am not able to get

a moving average for this indicator or any other indicator, such as the on balance volume indicator.  Is there a code that would help with this problem? thanks.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on October 12, 2020 4:30 pm
92 views
0
Private answer

If you are refering to the study named "AdvanceDecline". You can reference the main plot of that chart study like so:

plot ad = AdvanceDecline().AD;

Then you take the ad variable you just created and use it as the price for a moving average:

plot adAverage = Average(ad, 21);

Put those to lines together into a new chart study, add the declare lower; statement at the top and you have completed this solution.

You can apply the same technique to any of the built-in studies provided with Thinkorswim.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on October 12, 2020 6:29 pm