Code for High, Low 2 last bar week H4
Here's one way:
int start()
{
double high, low;
for(int i = 0; i < Bars-1; i++){
if( TimeDay( iTime(Symbol(), PERIOD_H4, i)) == TimeDay(TimeCurrent())) continue;
if( TimeDayOfWeek( iTime(Symbol(), PERIOD_H4, i)) == 5){
high = MathMax(iHigh(Symbol(), PERIOD_H4, i), iHigh(Symbol(), PERIOD_H4, i+1));
low = MathMin(iLow (Symbol(), PERIOD_H4, i), iLow (Symbol(), PERIOD_H4, i+1));
break;
}
}
Comment( "High = "+high+
"\nLow = "+low);
return(0);
}
OK,thank you.
If i want to introduce code for line indicator Hi and Lo with this, is this complicated?
Thanks
If i want to introduce code for line indicator Hi and Lo with this, is this complicated?
Thanks
?
Thanks