Your CloseLong and CloseShort TA's are incorrect (below). In both, you have condition A = condition A, which will always be true and hence always be looking to close your position. I assume you want to close longs on appearance of a red arrow and close shorts on appearance of a blue arrow. Try changing the condition within each TA respectively to:
CloseLong if Jasent, Mode 1 > User Defined Number 0; and
CloseShort if Jasent, Mode 0 > User Defined Number 0.
If that doesn't work, try:
CloseLong if Jasent, Mode 1 > User Defined Number 0.0000001; and
CloseShort if Jasent, Mode 0 > User Defined Number 0.0000001.
Apparently, 0 doesn't always equal 0 in MT4.
Also, be aware that using shift 0 does not wait for your current candle to close, so the arrows may appear and disappear several times even though you exited your position on the first appearance of an arrow. Using shift 1 would use the actual close of your previous candle.
MolanisFX or admin will correct me if I'm wrong..
Attachment:
incorrect.png [ 126.94 KiB | Viewed 556 times ]