Advertisement
Maurizio-Ciullo

34 Lezione Personale Monitorare La Position Size

Nov 3rd, 2022 (edited)
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --------------------------------------------*(34 Lezione Personale Monitorare La Position Size)*-------------------------------------------------
  2.  
  3.             //QUESTO PEZZO DI CODICE MONITORA LA NOSTRA POSITION SIZE, CI DICE:
  4.  
  5. //1)QUANTI PEZZI COMPRIAMO O VENDIAMO
  6. //2)QUANTO PEZZI POSSEDIAMO
  7. //3)SEGNA CON UNA CROCE QUANDO ABBIAMO TOCCATO STOP LOSS O TAKE PROFIT
  8.  
  9.  
  10. //@version=5
  11. strategy(title="Study Test Alert/Ingre Limit/Canc Ord Pend", overlay=true, precision = 4, ETC...
  12.  
  13.  
  14.  
  15.  
  16. ////////////////////////// INIZIO MONITORAGGIO POSITION SIZE //////////////////////////
  17.  
  18. bought = strategy.position_size[0]> strategy.position_size[1]
  19. Close_TP = false    
  20. Close_TP := strategy.position_size[1] - strategy.position_size[0] and strategy.position_size[1] != 0 and strategy.position_size[0] != 0
  21.  
  22.  
  23. plotshape(Close_TP,title="Close_TP", style=shape.xcross, color=color.blue, size =size.small, editable = true)
  24. plot(strategy.position_size[1],"Position Old")
  25. plot(strategy.position_size,"Position")
  26.  
  27. ////////////////////////// FINE MONITORAGGIO POSITION SIZE //////////////////////////
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement