Hello my brothers.
I'm trying to make a indicator.
iHighest = 20 bars to get the highest price.
What is wrong?? :(((
thank you so much!
SetIndexStyle (0, DRAW_ARROW);
SetIndexArrow (0, 159);
dMax = High[iHighest(NULL,NULL,MODE_HIGH,20,i)];
You are getting what is produced by your code, which is much the same as the upper line of a Donchian channel.
We don't know what logic you have used to place lines on your "expected" chart, so cannot advise anything.
You are placing a dot on every bar at the last highest 20.
Your expected chart is to place a dot at the last highest 20 from there 12 back and 30 forward. You have no code to do that - that is what is wrong!
To add comments, please log in or register