EA Problem

 
I create a EA and when i compiled it, it show a 0 Error and 6 warning.But i ignore it and test on MT4 strategy tester it EA give me a good result. But i solved all warning and now 0 error and 0 warning, now i test it on strategy tester, it become a worst EA. what is the problem on it. can i run my bot with warning???
 
Niwantha Ravihansa:
I create a EA and when i compiled it, it show a 0 Error and 6 warning.But i ignore it and test on MT4 strategy tester it EA give me a good result. But i solved all warning and now 0 error and 0 warning, now i test it on strategy tester, it become a worst EA. what is the problem on it. can i run my bot with warning???

yes

 
  1. Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.

  3. What did you set for spread?

    Always specify Tester-SpreadDon't use current

    The spread is constant during the run. It is the current spread for the pair (your broker,) at the moment you start the test.

    If you start the test on the weekend, the current spread is likely to be very large.

    Most brokers with variable spread widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY (OANDA) shows average spread = 26 points, but average maximum spread = 134. The charts show Bid prices only. Turn on the Ask line to see how big the spread is, Tools → Options (control+O) → charts → Show ask line.
 
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
Reason: