I Want to compare the high of the day to the previous candle every time the current candle close.
I have this piece of code:
The problem is, that if i use this approach and previous candle by random is the highest of the day it doesn't work correctly.
I'm thinking of counting back to midnight, but how do i do that best?
I actually want to compare to the second highest candle in the chart.
I have this piece of code:
Inserted Code
double TH = iHigh(NULL, PERIOD_D1, 0); // today's high if ((High[1] > TH) && (Close[1] < TH) { Some code here... }
The problem is, that if i use this approach and previous candle by random is the highest of the day it doesn't work correctly.
I'm thinking of counting back to midnight, but how do i do that best?
I actually want to compare to the second highest candle in the chart.
Blindly following others will make you blind!