Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. slPoints = input(defval = 0, title = "Initial Stop Loss Points (zero to disable)", minval = 0)
  2. tpPoints = input(defval = 0, title = "Initial Target Profit Points (zero for disable)", minval = 0)
  3.  
  4. TP = tpPoints>0?tpPoints:na
  5. SL = slPoints>0?slPoints:na
  6.  
  7.  
  8. strategy.exit("XL", from_entry = "long", profit = TP, loss = SL)
  9. strategy.exit("XS", from_entry = "short", profit = TP, loss = SL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement