I have been trying to translate a strategy into study (for alerts), but I'm stuck with these few lines :
longStop := strategy.position_size <= 0 ? longCondition ? tempStopLong : na : longStop[1]
longProfit := strategy.position_size <= 0 ? longCondition ? tempProfitLong : na : longProfit[1]
shortStop := strategy.position_size >= 0 ? shortCondition ? tempStopShort : na : shortStop[1]
shortProfit := strategy.position_size >= 0 ? shortCondition ? tempProfitShort : na : shortProfit[1]
They are used for exiting a position. I would be really grateful if somebody could help me with that ! It's from an open source code, here is the full code if the context could help : https://www.tradingview.com/script/FUnOi1Nx-3x-SuperTrend-Strategy-Mel0nTek-V1/
Thanks !