Problem with the MT4 Platform

 

Can someone tell me why I am having problems with the MT4 platform when I try running my EA?

The problem is that I run a 5 minute chart. I expect that that there should be a logging of variables at the start of the next 5 minute period. It doesn't; I get no sense of action occurring. The code was updated use state machines in order to diminish the processing time during a tick.

Does anyone detect a problem here?

Files:
 
It should be noted that the build of the Platform is 509.
 
leslie: Does anyone detect a problem here?
  1. Get your EA to compile. SUNDAY is not defined.
  2. Using TimeLocal() means you can't use the tester.
  3. lotSize = MarketInfo("GBPUSD", MODE_LOTSIZE); means you can't trade any other symbol.
  4. if ( StringFind(Symbol(), "JPY") > (-1) ) means you can't trade metals Do it right (including SLIPPAGE) https://www.mql5.com/en/forum/141509 and a jpy pip is 0.01 not 0.001
  5. bid = NormalizeDouble(Bid, Digits); no need to use normalize double EVER. Predefined variables are fine by themselfs
 
leslie:
It should be noted that the build of the Platform is 509.

I think I may found the problem. The systemState of PHASE_UNDETERMINED does not reassign the state variable. It stays stuck in PHASE_UNDETERMINED. It should be reassigned to PHASE_COLLECT_TICK_DATA, so that when the 5 minute period expires, the test can then be made to determine if the EA can test if either a Buy or Sell should be done.