XavierAndreu

Numeros Redondos

Mar 26th, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. // https://youtu.be/eL6PiBH4c9s
  2.  
  3. //Coloca lineas entre 2 valores max y min dando un valor de distancia entre ellos
  4.  
  5. input double Minimo=1.2;
  6. input double Maximo=1.4;
  7. input double Valor=0.01;
  8. input color Color_Linea=clrOlive;
  9. //input ENUM_TIMEFRAMES Time= PERIOD_D1;
  10.  
  11. void OnInit()
  12. {
  13.  
  14. if(Minimo>Maximo) Alert("Valores Min Max erroneos!");
  15.  
  16. for(double a= Minimo;a<=Maximo;a=a+Valor)
  17. {
  18. DibujarLinea(rand(),a);
  19. }
  20. ExpertRemove();
  21.  
  22. }
  23.  
  24. void DibujarLinea(string Linea, double Posicion)
  25. {
  26. ObjectCreate(Symbol(),Linea,OBJ_HLINE,0,0,Posicion);
  27. ObjectSetInteger(0,Linea,OBJPROP_COLOR,Color_Linea);
  28. ObjectSetInteger(0,Linea,OBJPROP_WIDTH,1);
  29. // ObjectSetInteger(0,Linea,OBJPROP_TIMEFRAMES,PERIOD_D1);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment