First test of an EA of my own not working very well for now :(

 

Any help welcome :) thanks!!!

Files:
 
It helps also if you say specifically what problems you are having.
 
JD4:
It helps also if you say specifically what problems you are having.

Hi

Ok sorry I had to got to Belgium quickly and was so proud of my first lines of mql5 coding that I wanted to publish my code immediately loool

Well, back from Belgium I have backtested my new EA on one year and one month. In the last month of July it makes a virtual profit of 77$.

On one year backtesting, with some parameters optimized for EURUSD, it makes a profit of 2528$, even if the initial deposit is set to 100$ in the mql5 tester with maximal absolute drawdown of 37.70$.

I'd like to know what you think about it and if you think that I could make profit with it with real account, considering that one year backtesting with positive result is what makes me sure about my EA.

Here is the EA code attached here.


I should add that initially I wanted the automatic trader to trade on upgoing curve and downgoing curve also but by mistake I think that it trades only on downgoing curve. I'll try to find why it only trades on downgoing curve because if I can make it trade also on upgoing curve I think it could double up the profit (to more than 5000$ with initial deposit of 100$).

Files:
 
trader77330:

Hi

Ok sorry I had to got to Belgium quickly and was so proud of my first lines of mql5 coding that I wanted to publish my code immediately loool

Well, back from Belgium I have backtested my new EA on one year and one month. In the last month of July it makes a virtual profit of 77$.

On one year backtesting, with some parameters optimized for EURUSD, it makes a profit of 2528$, even if the initial deposit is set to 100$ in the mql5 tester with maximal absolute drawdown of 37.70$.

I'd like to know what you think about it and if you think that I could make profit with it with real account, considering that one year backtesting with positive result is what makes me sure about my EA.

Here is the EA code attached here.


I should add that initially I wanted the automatic trader to trade on upgoing curve and downgoing curve also but by mistake I think that it trades only on downgoing curve. I'll try to find why it only trades on downgoing curve because if I can make it trade also on upgoing curve I think it could double up the profit (to more than 5000$ with initial deposit of 100$).

There will be different between backtesting and real result due to many reasons. Just begin with small money.
 
Tan Phan Ngoc:
There will be different between backtesting and real result due to many reasons. Just begin with small money.

Thank you for your answer. Can you tell me more about the reasons ? thanks

 

I have optimized my code and it now trades on upgoing and downgoing curve and with one month backtesting it makes a profit of 900$ with initial investment of 200$ !!!!

In one year backtesting it makes a profit of 4825$ with initial deposit of 200$ (virtual!!!).

Awesome.

I'm in need of knowing the conditions that would make real testing differ from virtual testing but will open a new thread for that.

thanks

 
trader77330:

Thank you for your answer. Can you tell me more about the reasons ? thanks

I can tell some:

 - Different price when high impact news

 - Different spread

 
Tan Phan Ngoc:

I can tell some:

 - Different price when high impact news

 - Different spread

Thanks

 
trader77330:

Thank you for your answer. Can you tell me more about the reasons ? thanks

Curve fitting is another reason.

 Do you have 300+ trades in your sample? Does it work well on multiple currencies? Does it work well on other time-frames?

https://www.mql5.com/en/articles/586

How to Test a Trading Robot Before Buying
How to Test a Trading Robot Before Buying
  • 2012.11.09
  • MetaQuotes Software Corp.
  • www.mql5.com
Buying a trading robot on MQL5 Market has a distinct benefit over all other similar options - an automated system offered can be thoroughly tested directly in the MetaTrader 5 terminal. Before buying, an Expert Advisor can and should be carefully run in all unfavorable modes in the built-in Strategy Tester to get a complete grasp of the system.
Reason: