Hello i am nerd of tradingview and pinescript.
My problem is that i want to exit from an order at some conditions and ADD ALSOthe stoploss, see this :
strategy.entry("Buy", true, when = crossover(sma(close, 14), sma(close, 28)) // buy order
strategy.close("Buy", when = crossunder(sma(close, 14), sma(close, 28))) // sell order at condition
NOW i can't add stoploss condition! WHY??? the only way is this:
strategy.exit("STOP","Buy", stop = 100) //sell order at stoploss
I would like to sell when crossunder but protect me with stoploss but this is impossible... or i use se strategy.close with condition but without stoploss or i use strategy.exit with stoploss and takeprofit but without conditions!
There is a method to use conditions and stoploss togheter?
Thank you to all.