Developing a decent EA

 
I know this question is a bit broad, but I would like to know what things you guys consider important when developing an EA. I don't mean stuff related to MQL5 itself, but regarding trading strategies instead.
For example: Do you use indicators? Which ones? Does your analysis happen on multiple timeframes? What about Breakevens and Trailing stops?

I have no problems writing MQL5 but I can't find the way to make a profitable strategy. I developed some but the profit isn't good enough.

I've been studying for more than an year, if anyone could help me by giving any advice, I would appreciate it very much.
 
Mateus 99

You can read the following post from another thread/topic. Some parts of it have nothing to do with your question but the latter part can help with your thinking about how to choose a good strategy for coding in MQL.

Forum on trading, automated trading systems and testing trading strategies

Definition of a pin bar (indecision candle)

Fernando Carreiro, 2021.05.23 20:03

Unfortunately, you will not find a clear mechanical definition for a candle to be classified as indecision. It is a subjective, “fuzzy” quality. We can only truly say it for certain after the fact, because we cannot predict the future. All we can do is approximate its probability, based on things like the “tick” behaviour, volume weight, location and historical statistical metrics of other bars.

Just think about it! If there were a clear mechanical why to define when a bar signals indecision guaranteed, we would ALL be very rich!

So, take some time to think about all of what was said and try to implement as much of what you could understand and continue to study candle stick formations, naked price action trading.

However, I would like to leave you with some wisdom about my experiences with EAs.

In the beginning I tried to implement many strategies that I knew for a FACT were profitable in the hands on manual traders. But I never could do it well. I kept at it believing that I was just doing it incorrectly.

With time I became wiser about the reason. They were “manual” strategies that depended on “human” evaluations also know mathematically as “fuzzy logic”. But computers and coding require precise logic and binary decisions. It just is not very good at “human” strategies.

So, I abandoned all those, and came up with strategies that were good for computers but bad for humans. Strategies that were built on precise mathematical and statistical concepts. Things that humans just cannot do well, yet machines do very well. And I became profitable.

Now, I only use those types of strategies. I will not even consider any of the strategies floating about that were created for manual trading. For me, they are a waste of time and effort. I concentrate only on developing mathematical, statistical EAs combined with proper money management also based on mathematical principals.

Let humans trade with “human” strategies! Let machines trade with “machine” strategies!


 
Mateus 99:

I think: if you can get 20-40% per year but consistently (year in and year out) with a controlled and low drawdown you are one of the best out there.

I think you need to get your feet back on the ground and focus only about the risk management aspects of your strategy; REMEMBER: this is a survival "game". Profitability always comes later, as a "collateral effect" of your defensive and smart actions. Moral of the story: forget the "fantabillions" and try to stay safe and consistent.

The reasoning about the strategy is really complex and it is only up to you and your style.

You can or cannot use indicators; you can or cannot use trailing stops or breakeven. All these aspects are not holy grails by their self and there isn't a correct or wrong way to do it, so you can or cannot be succesful with or without them. It all depend on your style and your goals, what is the character of the movements you are trying to exploit, what are the exceptions etc.. The research can give you a lot of headache, it is a question of trials and errors and it can require years to come at a point where you are satisfied with the strategy as a whole.

 
Mateus 99:

All strategies can be combined to have a good EA, altough I had experienced some overfitting curve. Now i´m focusing on developing EA with few parameters and indicators, using price action and candlestick pattern analysis.

it´s a long walk to get a real good trading system, but we need to keep studying, learning and having good and not so good experiences.

 
Renato Takahashi:

All strategies can be combined to have a good EA, altough I had experienced some overfitting curve. Now i´m focusing on developing EA with few parameters and indicators, using price action and candlestick pattern analysis.

it´s a long walk to get a real good trading system, but we need to keep studying, learning and having good and not so good experiences.

Thanks for replying!
I wasn't using candlestick patterns on my EA, sounds good! I'll try to implement that.

 

Some of the above posts have been edited and some posts have been deleted.

If you want to discuss any EA, then please also attach the source code.

 
Keith Watford: Some of the above posts have been edited and some posts have been deleted. If you want to discuss any EA, then please also attach the source code.

May I ask politely, why the posts were deleted? There was no mention of anything by name and the images of tests did also not identify any EAs and I do believe the discussion was theoretical in nature and not specific to any EA or code in particular.

Did we break any of the rules or was there any misunderstanding or misinterpretation by any of us on the thread?

 
Fernando Carreiro:

May I ask politely, why the posts were deleted? There was no mention of anything by name and the images of tests did also not identify any EAs and I do believe the discussion was theoretical in nature and not specific to any EA or code in particular.

Did we break any of the rules or was there any misunderstanding or misinterpretation by any of us on the thread?

Many people use topics such as this to promote EAs etc.

I am not saying that there has been any such promotion in this topic, but it can and does happen.

People may write that their EA only makes 100% per year in the hope that they will get people PM them asking how they can get the EA. Same thing with posting backtest results.

So, if people want to discuss results of their EA, they should also attach the source code.

Fernando Carreiro:

 I do believe the discussion was theoretical in nature and not specific to any EA or code in particular.

Results are not theoretical and are specific to an  EA even if the name is not mentioned.

 
Keith Watford: Results are not theoretical and are specific to an  EA even if the name is not mentioned.

The results posted were being used as an example, as he was wondering about the "choppiness" and "dips" of his own EA, compared to the other one he had found and tested, and was asking how to improve it. Given that the other EA was much better than his own with fantastic results, everyone was being civil and quite nice about things and the mood was quite light and enjoyable. I did not feel that there was any intent for promotion of any kind by any party.

I do not agree with your overall assessment of the situation, but I guess we will just have to accept it. The mood is now somewhat dead, and I don't think the thread will continue much.

Reason: