NO EXTERNAL LINKS, SOURCE CODE REQUESTS OR MODIFICATION OF DECOMPILED INDICATORS. To avoid post deletion please follow the rules.

Simple Expert Advisors (EA's) for MT4

#1
mladen2016.04.25 #1This thread will be used to post simple expert advisors________________To repeat the already known
____________________________

The experts that are going to be posted here are not going to be complete trading systems - after all, building a trading system is much, much harder than the majority of traders want to admit it - but to post code for simply and reliable EA code that will help traders to do quick tests of single indicator performances with different parameter settings, that will help to see the usage of some indicators that are posted as ex4 files, and that will, possible help to be used as a basic frame that traders can use to develop their own systems and expert advisors.Tests conducted will not be aimed to make the EA profitable, but to make sure that it works as intended. Any other development (if something is proven to be interesting for further development based on a very simple set of rules), will be conducted in a separate thread 


Re: Simple Expert Advisors (EA's) for MT4

#2
As simple as it gets simple moving averages cross expert advisor :  simple ma cross ea.mq4     __________________It opens an order on a cross of two averages. If an order of opposite direction exists, it is first closes that order. If it fails to close the opposite order it will attempt the same thing (if the signal still exists) on the next tick (new order opening is prevented if the opposite direction order close fails). Some extra built in (like current profit for opened order display - just for the sake of simpler usage and providing a bit more information - that will probably be extended in the future versions of any of the experts posted here).It is an easy to use frame that can be used for similar tasks and, as all can see, the code is as simple as it gets. There is no need for anything more complicated for this kind of tests
simple_ma_cross_ea.mq4
(4.99 KiB) Downloaded 1253 times

Re: Simple Expert Advisors (EA's) for MT4

#3
mladen wrote:As simple as it gets simple moving averages cross expert advisor :  simple ma cross ea.mq4     __________________It opens an order on a cross of two averages. If an order of opposite direction exists, it is first closes that order. If it fails to close the opposite order it will attempt the same thing (if the signal still exists) on the next tick (new order opening is prevented if the opposite direction order close fails). Some extra built in (like current profit for opened order display - just for the sake of simpler usage and providing a bit more information - that will probably be extended in the future versions of any of the experts posted here).It is an easy to use frame that can be used for similar tasks and, as all can see, the code is as simple as it gets. There is no need for anything more complicated for this kind of tests
Dearest MLADEN
First,Thanks for opening this thread as many traders were requesting and requiring for it,then your kinds as always for posting your first sample EA as simple as its name
Not as for extending your job but as for possible suggestion i request you for addition of your time control snippet within from your next ea posting.
regards
Indicator is just a tool.

Use it only if it can benefit you. Leave it if you don't know how to use it optimally.


Re: Simple Expert Advisors (EA's) for MT4

#9
mntiwana wrote: Dearest MLADEN
First,Thanks for opening this thread as many traders were requesting and requiring for it,then your kinds as always for posting your first sample EA as simple as its name
Not as for extending your job but as for possible suggestion i request you for addition of your time control snippet within from your next ea posting.
regards
Here is a version with time filter added
What it does : if the time falls within the time filter it opens and closes orders as required. If the time is outside the time limits, it will not open new orders, but if there are orders that need to be closed, they will be closed (in order to prevent loses in cases of trend change)
simple_ma_cross_ea_(with_time_filter).mq4
(6.67 KiB) Downloaded 1022 times

Re: Simple Expert Advisors (EA's) for MT4

#10
mladen wrote:
Here is a version with time filter added
What it does : if the time falls within the time filter it opens and closes orders as required. If the time is outside the time limits, it will not open new orders, but if there are orders that need to be closed, they will be closed (in order to prevent loses in cases of trend change)

Dearest MLADENSo many thanks for your so early response then it is really fantastic function you added ... "but if there are orders that need to be closed, they will be closed (in order to prevent loses in cases of trend change)" what a art full coding
regards
Indicator is just a tool.

Use it only if it can benefit you. Leave it if you don't know how to use it optimally.