Plotting higher highs going back in time


Category:
0
0

Hi all I have a question about going backwards through chart data. The below line plots a line across the progressively higher highs over the chart data.

rec highs = if isnan(high[1]) then double.nan else if high > highs[1] then high else highs[1];

What I’m trying to do is start at the most recent point and go backwards identifying higher highs as you go back in time.

Tried messing with fold but having trouble.  Any suggestions are appreciated.

Thank you.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on January 10, 2018 10:14 am
97 views
0
Private answer

We cannot loop backwards through the chart data with Thinkorswim. Fold is a very rudimentary form of looping but it can only go forward. So if you are going to solve this it must be a solution that moves through the chart data from left to right.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 10, 2018 11:57 am