XavierAndreu

Objeto Línea Vertical

Apr 23rd, 2022
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // Youtube-> https://youtu.be/yTGEi4s8fL8
  2.  
  3. int NumeroVela=200;
  4. //datetime Fecha=D'2021.12.31 00:00';
  5. //TimeCurrent()
  6. void OnStart()
  7. {
  8. MqlRates InfoPrecio[];
  9. ArraySetAsSeries(InfoPrecio,true);
  10. CopyRates(Symbol(),PERIOD_CURRENT,0,NumeroVela+1,InfoPrecio);
  11.  
  12. CrearLinea("1",InfoPrecio[NumeroVela].time);
  13. }
  14.  
  15. void CrearLinea(string identificador,datetime Posicion)
  16. {
  17. ObjectCreate(Symbol(),identificador,OBJ_VLINE,0,Posicion,0);
  18. ObjectSetInteger(Symbol(),identificador,OBJPROP_COLOR,clrYellow);
  19. ObjectSetInteger(Symbol(),identificador,OBJPROP_WIDTH,2);
  20. ObjectSetInteger(Symbol(),identificador,OBJPROP_STYLE,STYLE_DASH);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment