How to set Stop-Loss and Take-Profit Levels using TradeAdapter
Updated
All aspect of the risk management of your trading strategy need be configured in your TradingView PineScript strategy. For that purpose you can use “profit”, “limit”, “loss” and “stop” parameters in PineScript function strategy.exit():
//@version=5
strategy(title = "simple strategy exit example")
if open > high[1]
strategy.entry("long", strategy.long, 1)
strategy.exit("exit", "long", profit = 10, loss = 5)
please read detailed instructions for the strategy.exit() functions here: https://www.tradingview.com/pine-script-reference/v5/#fun_strategy.exit