lm = close + (close / 100 * 5)
strategy.entry(nl, strategy.long)
strategy.exit( el, nl, limit = lm)
The strategy sometimes closes a position ahead of time.
I entered the opening and closing prices in the pine log to get a take profit (5%)
Entry: 0.020705
Take profit: 0.021740 (5%)
However, the deal was closed at ~2%
New contributor
Denis19911903 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.