why this simple code doesnt work ? please help

this program doesnt buy and sell on the chart and I dont know why, can you tell me the reason ?


fa3

The check is performed only once, at startup.
Better to move the code to OnTick.
Too strict limit "==". Better to do "<=" or ">=".
Konstantin Nikitin:
The check is performed only once, at startup.
Better to move the code to OnTick.
Too strict limit "==". Better to do "<=" or ">=".
thank you very much for your help, I will do that and let's see what will happen next :-)