Trailing Stops 1
Trailing Stops 1
// Enter mock trade (if bar is the one we clicked on and we have no open trades or
previous trades)
if time >= barTime and strategy.position_size == 0 and strategy.closedtrades == 0
strategy.entry("Trade", direction = (tradeType == "Long" ? strategy.long :
strategy.short))