-As attached, the high/low value output must be displayed on chart as marked circle, significant peak points of a given number of bars. Number of peak points should not depend on the total number of bars. The indicator should perform at any number of bars.
There are roughly 1500 bars on example1, and 80 bars on example2.
Your job is to figure out a way to code to achieve such output.
I will not give you a detailed specification how to code and you would have to create a indicator that output the peak price as marked on the attached file which should not take more than 3 hours to code. The number of output should be no less than 20 on each set number of bars but if the peak points are less, then it’s OK.
-The number of bars determines the very last bar to be discarded.
-When the new bar is formed, even if the price value is repainted until the peak is reached, all price values (Marked as circle) must remain within the number of bars frame displayed after the peak.