Expert Advisor Template with Trailing Stop:
This is a template for Expert Advisor coders to decrease their coding time. It contain Trailing Stop, autolots (true or false) and function scanning previous candles to find the lowest and the highest order price in the past.
There is a lot more innovations to make it work better like buy, sell block or max orders opened on current symbol.
Hallo Jacek D C,Excellent template. I need it. Code base is lack of such an ideal template (I tested above 80 here). You did not put any magic number. I guess ticket is that. Am I right? If not can you add a magic number?Thanks and regards,
Can you please post your template including an example of a functional expert advisor, e.g. include MACD and Signal
(If MACD-Signal >0 then BUY, ...if <0 SELL, .....etc...) , because I don not know where to put the conditions BUY. SELL and the EXITS.
Thanks and Regards
Hi Jacek D C
I tried to make it functional but could not. Experts coders don't need this template. Newbies like me need it. If you add a magic number and set an example as AndPra suggested that will be helpful.Thanks and regards,
OK. It seems this template of JacekDC needs further work for the buy and sell blocks.
Let's talk instead about existing fully working templates. I have tried some of them and the best I could find was from http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ You can enter this with setting "Custom" for indicators, set all options and you get a General Template. Then you can edit this EA with Metaeditor setting your particular inputs. It works fine. You can set BUY and BUY CLOSE and SELL and SELL CLOSE.
Do you know any other template available that could be better or more complete in functions?
I found one template 'Universal EA' in this Codebase. Complete and functional. The coder uses most of the indicators, Magic number and trailing stop. Not profitable but ready for a tailor cut and profit making. Fine tuning the system may give a good profit.
Yes Universal EA is OK. However I fear it has only BUY and SELL options (using sell as exit the buy as exit of sell ), do you think so?. I need an extra BUY EXIT (and SELL EXIT) code as in some cases exit has to be faster than e.g using sell as exiting the buy. I also need a template with the optional code A) to enter and exit a specific time of trade and B) also possible to select a limit for the variable spread of the broker when it gets high (higher spread during the day may ruin the results).
The issue with EA seems to be that good designed templates are not given for free. So, maybe a good programmer can get some (3-4) good different free EA from internet and combine their codes in one really multifunction general and universal template. A last remark is that different templates with exactly all same inputs give different results, and this makes hard the selection (try for instance http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ and another one, the http://www.ForexEAdvisor.com with same exactly inputs and criteria.
Nothing is free in the world.I don't find anything better than the sites you mentioned here. I bookmarked these pages.
Thanks and regards,
N.B. I just got one in this forum:http://articles.mql4.com/482.
Yes, is fine but I think has only BUY and SELL and no specific BUY. SELL EXITS. I am now searching a piece of code to introduce selection of trading hours.
PS: Maybe we should start/open this "EA template discussion" in the Forum to get more readers.
Im back from holidays. Thank you for comments. After reading all of them i decided to upgrade my template to make it short, compressed and fucntional. Also ill add simple working ea based on my template. Stay focus and have a nice trades :)