One can see in this EA, you just need to exchange the nusinessLogic() for different algorithm.
One can set the trading time period (from when to when).
One can set if the trade will be close at the session end everyday.
One can set the trailing stop etc.
If you want to share this code with everyone needing this solution, you need to document (add comments at least) to your code so others can understand what exactly you are doing. Nobody will take a code like this, put money on it and start trading right away.
The worst part in an EA is not the setup/idea on entering/exiting a trade, it is managing the trade itself. It is a hell of a task.
One idea for you is to put a Shared Project and let others help to conceive a good Trade Manager so all can really benefit from it.
Just as an exampleof what I'm trying to say, let's take the 7th line of your code, the Magic Number. Why not put it as an Input Parameter so you can run this very same template, with different setups, on the SAME asset/paper? And going further, would you be using a Netting or Hedging account? And so on... and on... and on...
Cheers!
;)
If you want to share this code with everyone needing this solution, you need to document (add comments at least) to your code so others can understand what exactly you are doing. Nobody will take a code like this, put money on it and start trading right away.
The worst part in an EA is not the setup/idea on entering/exiting a trade, it is managing the trade itself. It is a hell of a task.
One idea for you is to put a Shared Project and let others help to conceive a good Trade Manager so all can really benefit from it.
Just as an exampleof what I'm trying to say, let's take the 7th line of your code, the Magic Number. Why not put it as an Input Parameter so you can run this very same template, with different setups, on the SAME asset/paper? And going further, would you be using a Netting or Hedging account? And so on... and on... and on...
Cheers!
;)
I thought the code could be understood (easily) :-)
And if you are not sure if it is good or not, simply test it first.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Since a time I've been thinking about to build an EA template sothat I don't need to write the whole codes but just the business logic. Here is my code: