I have been trying to write two scripts which place BuyStops or SellStops.
In the case of a Buy, I want to place a BuyStop at a price just above the current price, but, which ends in 00 or 50 (5 digits)
In the case of a Sell, I want to place a SellStop at a price just below the current price, but, which ends in 00 or 50 (5 digits)
I just can't get it right.
Please look at what I've done and set me on the right path.
My logic seems right according to me, but, it does not work according to my logic.
Attached is as far as I have got.