//Buy entry longEntryCondition = close > nz(longEntryCondition[1],open) and (close - open)[1] > 0 if longEntryCondition and not nz(longExitCondition[1],false) strategy.entry("Long", strategy.long, comment="Buy")
//Stoploss stopLevel = open - (open - close)[1] if longEntryCondition strategy.exit("StopLoss", "Long", stop=stopLevel, comment="StopLoss")
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.