Highestprice = ta.highest(close, 20)
LowestPrice = ta.lowest(close, 200)
Bid1exitCondition = state == 1 and close > fairValue and close < Highestprice[1]
if Bid1exitCondition
strategy.close("Bid 1 Close")
state:= 0
I was expecting an exit. I defined an exit in the bidexit condition. But nothing happened.
Your entry should be like this :
Then your exit should be like this :
In your exit you need to specify the name of your entry in from_entry, here it is 'long'