Simple experts

+ New Comment
mladen
Join date: 2006.10.03
Private message
#1

This thread will be used to post simple expert advisors

________________

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

Maybe the above sounds complicated (unlike the name ) but all will be much clearer as soon as a couple of experts is posted here

mladen
Join date: 2006.10.03
Private message
#2

Here is the first one

__________________

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

mladen
Join date: 2006.10.03
Private message
#3

Adding this one (since it was talked about something like this here : https://www.forex-tsd.com/forum/debates-discussions/indicators-expert-systems-and-tools/metatrader-4/1806627-hull-variation-2-ea ) : simple_hull_variation_ea.mq4

________________

Indicator used by the EA (must be in the indicators folder) : hull_variation_2.mq4

talaate
Join date: 2014.04.17
Private message
#4

Thanks Mladen for this thread

Can we add some other idea to be converted to EA?

mladen
Join date: 2006.10.03
Private message
#5

In order to avoid some misunderstandings

________________

The purpose of these experts is not to test trading systems. Rather they will be made to test "out of the box" performance of indicators and to show by example trhe usage of some ex4 versions posted. So, all in all, they will be made as a help to quickly asses if some indicator was traded based on some criteria (slope change, zero crosses, signal crosses, etc ...) what would be the performance of such an indicator. The experts that are based on a system (with proper MM and all the rest that goes with that) rather than on a single indicator performance will have their own place

PS: I see that it will probably be a good idea to add some basic operations that are common. For that reason some things will be added (trailing stop will be first to be added) but I intend to keep these as simple as it can be - in order to avoid "mudding" the single indicator performance testings

mladen
Join date: 2006.10.03
Private message
#6
talaate:
Thanks Mladen for this thread Can we add some other idea to be converted to EA?

Talaat E

Of course - that is the purpose of the thread too : to allow that type of testing, but withing the guidance of this threads purpose (check my previous post)

Eventually for things we all find more than just a test, separate development threads will be started

talaate
Join date: 2014.04.17
Private message
#7
mladen:

Talaat E

Of course - that is the purpose of the thread too : to allow that type of testing, but withing the guidance of this threads purpose (check my previous post)

Eventually for things we all find more than just a test, separate development threads will be started

Thanks Mladen your reply

I guess there many indicators are deserved to be experimentally tested as EA, of them StepMA of rsi adaptive ema 2_3 and Averages ribbon 2_4from point of view can be started with.

Of course, indicators like Ehlers Fisher transform as well as last versions of XO and Aroon also are promising for EA.

Any way, I really don't want to be a greedy person but finally it is up to you to decide.

Thanks

mntiwana
Join date: 2013.03.26
Private message
#8
mladen:

Talaat E

Of course - that is the purpose of the thread too : to allow that type of testing, but withing the guidance of this threads purpose (check my previous post)

Eventually for things we all find more than just a test, separate development threads will be started

Dearest MLADEN

A lot of thanks for opening and starting this thread,of course many of us needs your expertise skills on EAs.this part is totally garaged since long due to strict restrictions but now with your kind initiative and keen interest i hope we will be have that too at same status/level as we having new tools.and gradually adding all required factors as to make it independent trading tool....my utmost wish.

regards

mladen
Join date: 2006.10.03
Private message
#9
talaate:

Thanks Mladen your reply

I guess there many indicators are deserved to be experimentally tested as EA, of them StepMA of rsi adaptive ema 2_3 and Averages ribbon 2_4from point of view can be started with.

Of course, indicators like Ehlers Fisher transform as well as last versions of XO and Aroon also are promising for EA.

Any way, I really don't want to be a greedy person but finally it is up to you to decide.

Thanks

OK. That s a good list to start with. Will post as it is made

mntiwana
Join date: 2013.03.26
Private message
#10
mladen:
OK. That s a good list to start with. Will post as it is made

Dearest MLADEN

i have tested and tried simple hull variation ea,it is working well according to code ...... one thing i noticed,is missing, and mostly EAs in the market dont have this function/facility,but i think it should be a basic part of every EA with true/false option,if some one dont like use it....... ea must be check ORDER status after every (specific time-in seconds) continuously,if there is any opened trade,if yes,do nothing,.......if no,check for order conditions,if met,open an order accordingly.......what i noticed,when a trade/order is closed due to any reason (BE,SL,TP or manually/accidentally) ea keep silent (inactive) till the trend change in opposite direction,though some times price move for hundreds pips in same trend (order closed direction).....hope i explained right enough but you can decide better..........of course i am greedy for EA,exact opposite to dear talaate.:)

regards

mladen
Join date: 2006.10.03
Private message
#11
mntiwana:

Dearest MLADEN

i have tested and tried simple hull variation ea,it is working well according to code ...... one thing i noticed,is missing, and mostly EAs in the market dont have this function/facility,but i think it should be a basic part of every EA with true/false option,if some one dont like use it....... ea must be check ORDER status after every (specific time-in seconds) continuously,if there is any opened trade,if yes,do nothing,.......if no,check for order conditions,if met,open an order accordingly.......what i noticed,when a trade/order is closed due to any reason (BE,SL,TP or manually/accidentally) ea keep silent (inactive) till the trend change in opposite direction,though some times price move for hundreds pips in same trend (order closed direction).....hope i explained right enough but you can decide better..........of course i am greedy for EA,exact opposite to dear talaate.:)

regards

mntiwana

It is checking that already. With trailing stops it will do some more, but all is OK now too (that is the beauty of a very simple code - it does all the expected in a very few lines of code )

mntiwana
Join date: 2013.03.26
Private message
#12
mladen:

mntiwana

It is checking that already. With trailing stops it will do some more, but all is OK now too (that is the beauty of a very simple code - it does all the expected in a very few lines of code )

Dearest MLADEN

thanks for reply,and yes,is simple,short and effective ....... as for checking that already,just apply it,let it take one trade (assume it is buy),close that trade manually and see it will not take any further trade in that direction till the opposite side came in place,i means it will not take any buy trade further more but will wait till the trend change and then it will take a sell trade.

regards

mladen
Join date: 2006.10.03
Private message
#13
mntiwana:

Dearest MLADEN

thanks for reply,and yes,is simple,short and effective ....... as for checking that already,just apply it,let it take one trade (assume it is buy),close that trade manually and see it will not take any further trade in that direction till the opposite side came in place,i means it will not take any buy trade further more but will wait till the trend change and then it will take a sell trade.

regards

mntiwana

If the trade is closed on the same bar as it is opened, the EA will open a new order (if the signal to do that is still valid), since there is no limit to open just one order per bar (in the case when the order was opened and closed at the same bar). But if the order was closed on a bar different than the bar when it was opened and of there is no signal, the EA will wait for a new signal - it can open a new order only when the signal to open order comes

Dostoyevsky
Join date: 2012.02.01
Private message
#14

Mladen this thread is spot on. Thanks a lot for initiative.

I'm trying to understand your comment about opening a second trade on the same bar in case the first one gets closed. I'm not good at programming so I can't have a look into the code and figure out what's going on there but my assumption is that a new trade is generated i.e. opened with the first tick of the new candle. The EA generates a signal during the previous candle and when that candle is over it acts as a confirmation (signal is still valid) to open a trade as soon as a new candle starts. Am I right? As far as I can see it would be impossible to open and close a trade on the same bar i.e. candle.

mntiwana
Join date: 2013.03.26
Private message
#15
mladen:

mntiwana

If the trade is closed on the same bar as it is opened, the EA will open a new order (if the signal to do that is still valid), since there is no limit to open just one order per bar (in the case when the order was opened and closed at the same bar). But if the order was closed on a bar different than the bar when it was opened and of there is no signal, the EA will wait for a new signal - it can open a new order only when the signal to open order comes

Dearest MLADEN

yes,and thanks to explain me how it is taking signals,you explained well ....... do you think it should not check regularly and continuously when there is no open trade, and signal is always there........regardless how order was closed (at same bar or later on any other next bar)....suppose order was closed early due to some reason (not on signal change) but price is going further in same trend direction for hundreds pips.

regards