DislikedHi Steve
Sorry to bother you. Going home EA is using a lot of CPU resources (I guess it is constantly scanning and calculating, hence the high cpu). It may not cause a problem if there are not that many instances of mt4 running. However, on my VPS I have 8 mt4s running and this is causing problems. Is there a way I can get round this? I thought maybe if we have a single pair version then it would not use as much CPU power (since I have set the spread to 6 only there would not be that many instances running at the same time).
Kind regardsIgnored
When I added the delay timer, I realised the length of delay could be a user choice, so there is a new input - LoopDelayTimer. The default is one second, but changing this to, say, 5000 gives a 5 second delay each time around the loop.
Whilst doing this, I noticed that I had the stoch comparison for the trade to sell and the trade to buy, the wrong way around. If anybody has had any trades triggered yet, they should have been the wrong way around.
I took a couple of manual trades at the start of the Asian session that GH ignored. I do not know if this is because the spread was too wide or because the trade trigger code is faulty. Given that I do not understand Scott's code, the latter is highly likely.
As an interim measure folks, set MaxSpreadAllowed to a ridiculously high figure so we know the spread will not stop trades whilst I work out if the trigger logic is correct.
Update in post 1.