Hi All,
I am trying to troubleshoot some code here. The code sees a bear bar as the first bar on a Monday regardless of whether it is or not.
It does not seem to do it at other times or I haven't been able to find an instance yet. I wonder if anyone has any clue what is happening cause I am being driven nuts with this.
Be really grateful if someone can shed some light on this.
.
I am trying to troubleshoot some code here. The code sees a bear bar as the first bar on a Monday regardless of whether it is or not.
It does not seem to do it at other times or I haven't been able to find an instance yet. I wonder if anyone has any clue what is happening cause I am being driven nuts with this.
Inserted Code
double last4High = iHigh(NULL,PERIOD_H4,1);
double Higest4hHigh = iHigh(NULL,240,iHighest(NULL,240, MODE_HIGH,20,2));
bool Market4High = (last4High >= Higest4hHigh);
bool Bar4Bear = (iOpen(NULL,PERIOD_H4,1) >= iClose(NULL,PERIOD_H4,1));
//----------------------------------------------------
if (Bar4Bear)
{
if(Market4High) Print(" last 4H bar is highest for 20 bars ", (Higest4hHigh));
}
//-----------------------------------------------------------
Not code but log below.. the opening 4 hour bar was a bull bar.
2009.08.03 06:18 b.beta GBPUSD,M15: last 4H bar is highest for 20 bars 1.6731 .