//+------------------------------------------------------------------+
//| FrVol.mq4 |
//| Ñðåäíåå ðàññòîÿíèå ìåæäó ôðàêòàëàìè |
//| |
//+------------------------------------------------------------------+
#property copyright "Barmaley"
#property link ""
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
double u,d,U,D;
int cu,cd;
//----
for (int i=3;i<=Bars-3;i++) {
u=iFractals(NULL,0,MODE_UPPER,i);
d=iFractals(NULL,0,MODE_LOWER,i);
if (u>0) {U+=u;cu++;}
if (d>0) {D+=d;cd++;}
}
U/=cu; D/=cd;
int V=(U-D)/Point;
Comment (Symbol()," TF=",Period()," ",V);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments