• Sign up >>

Problem with Parabolic sar

To add comments, please log in or register
winneroftrading
37
winneroftrading  

i have a problem with this EA and i can't find it....



#property copyright "Copyright 2019, MetaQuotes Software Corp." 
#propiedad enlace "https://www.mql5.com"
#propiedad versión "1.00"
#propiedad estricta

doble en15min, en30min, en60min;
doble en15min1, en30min1, en60min1;
doble en15min2, en30min2, en60min2;
// + ----------------------------------------------- ------------------- +
// | Función de inicialización experta |
// + ----------------------------------------------- ------------------- +
int OnInit ()
  {
   return (INIT_SUCCEEDED);
  }

// + ---------------------------------------------- -------------------- +
// | El |
// + ----------------------------------------------- ------------------- +
void OnTick ()
  {
   en15min = iSAR (NULL, PERIOD_M15,0.01,0.01,1);
   en30min = iSAR (NULL, PERIOD_M30,0.01,0.01,1);
   en60min = iSAR (NULL, PERIOD_H1,0.01,0.01,1);
   Alerta ("en15min:" + en15min + "en30min:" + en30min + "en60min:" + en60min);
   en15min1 = iSAR (NULL, PERIOD_M15,0.001,0.001,1);
   en30min1 = iSAR (NULL, PERIOD_M30,0.001,0.001,1);
   en60min1 = iSAR (NULL, PERIOD_H1,0.001,0.001,1);
   Alerta ("en15min1:" + en15min1 + "en30min1:" + en30min1 + "en60min1:" + en60min1);
   en15min2 = iSAR (NULL, PERIOD_M15,0.0001,0.0001,1);
   en30min2 = iSAR (NULL, PERIOD_M30,0.0001,0.0001,1);
   en60min2 = iSAR (NULL, PERIOD_H1,0.0001,0.0001,1);
   Alerta ("en15min2:" + en15min2 + "en30min2:" + en30min2 + "en60min2:" + en60min2);

  }
// + ---------------------------------------------- -------------------- +

15 mins works ok
30 mins works ok too
1h with 0.01, 0.01 it's ok, 0.001, 0.001 y 0.0001, 0.0001 return 0 but

 if you change 

0.001, 0.001 to 0.009, 0.009 it's ok

0,0001, 0,0001 to 0,0009, 0,0009 still 0

if you open any pair and use parabolic sar with those values you can get values over the graphic. Means that that values exist, else graphic will be empty, then... What happends????? Because if it's working at 15, why are working a bit aver 30 and nothing over60????


To add comments, please log in or register