XavierAndreu

3 velas alcista bajista

Dec 23rd, 2022
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. int Bull=0;
  2. int Bear=0;
  3.  
  4. void OnTick()
  5. {
  6.  
  7. MqlRates InfoPrecio[];
  8. ArraySetAsSeries(InfoPrecio,true);
  9. CopyRates(Symbol(),Period(),0,4,InfoPrecio);
  10.  
  11. if(InfoPrecio[1].open<InfoPrecio[1].close
  12. && InfoPrecio[2].open<InfoPrecio[2].close
  13. && InfoPrecio[3].open<InfoPrecio[3].close)
  14.  
  15. Bull=Bull +1;
  16.  
  17. if(InfoPrecio[1].open>InfoPrecio[1].close
  18. && InfoPrecio[2].open>InfoPrecio[2].close
  19. && InfoPrecio[3].open>InfoPrecio[3].close)
  20.  
  21. Bear=Bear+1;
  22.  
  23. Comment("\n\nBear: ",Bear,
  24. "\n\nBull: ",Bull
  25. );
  26. }
Advertisement
Add Comment
Please, Sign In to add comment