Thread: MQL4 Guide
View Single Post
  #10 (permalink)  
Old 06-06-2007, 04:22 PM
RickD's Avatar
RickD RickD is offline
Member
 
Join Date: Jan 2006
Location: Eastern Europe
Posts: 54
RickD is on a distinguished road
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);
}
Reply With Quote