I am creating an indicator pinescript. And the strategy will exit on the reverse direction. For example : 20:00 : Long (Entry) 20:30 : Short (Exit and Entry Short)
But, I found it's trigger multipler alert on Indicator.
I know we can check the last order position with strategy.position_size but how to id on Indicator mode?
Because I want to avoid it's trigger same direction alert
For example 20:00 Long 20:05 Long
I am a new pinescript developer, I appreciate any kind of help! Thank you