Quote:
|
Originally Posted by prasxz
is there any mql script that can show daily , weekly and monthly range for one currency ?
Thx
===================
Forex Indicators Collection
|
Code:
double dRange = GetRange(D'01.01.2004 00:00', PERIOD_D1);
double wRange = GetRange(D'01.01.2004 00:00', PERIOD_W1);
double mRange = GetRange(D'01.01.2004 00:00', PERIOD_MN);
double GetRange(datetime tm, int period)
{
int bar = iBarShift(NULL, period, tm);
double range = iHigh(NULL, period, bar) - iLow(NULL, period, bar);
return (range);
}