Hmm...With my version (also with yours) i trade on every tick - so many trades happen...
This block

is to make sure that there were no errors regarding receiving different signals from other currency pairs - Very important if you want to test it in realtime (either DEMO or LIVE).
Sometimes if you use LastCandle... and you want to have exact levels of that last candle it sometime causes problems when coding it. To be precise I usually take GetHistoricalCandle. (Both is possible) It gives me a faster overview when reviewing a strategy.
Maybe you have to use

to have only one trade per candle.