Signals on entry and exit of OB/OS zones

I have a little problem to get arrows for buy
and sell signals on a subchart indicator when it
enters AND when it exits the OB/OS zones.
It shows either the entries or the exits
but not both, so the code

Buy = Cross( Indicator, OS );
Buy = Cross( OS, Indicator );
Sell = Cross( OB, Indicator );
Sell = Cross( Indicator, OB )

fails even without the

Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

How should it be coded to get the signals
in both cases ?

You need to use OR operator to combine two conditions.

Buy = Cross( Indicator, OS ) OR Cross( OS, Indicator );

Please do read the manual

1 Like

Thank you very much for your answer !
I could not find the thread this morning to tell
that in fact I had found the answer myself already
during the night when I was sleeping...
Best regards