You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi.
My idea is to modify a bit the EA called MACD Sample EA, in this way:
i would like to reprogram the algorithm in the way that i can switch between many entry(and also exit and modify) strategies.
In a concrete example:
When in the code there is this piece (for short opening position)
i would like to do something like this:
and this
and so on..
In other words, i search the way to make a series of "strategies"(invented by me) that may be simply i.e. the changes of the entry point parameters conditions(or also the changes of the exit, and modify parameters), in a way that those series/list of "strategies" are assigned to a int variable, for instance called int Strategy.
I can, in example assign the integer value for the first condition as Strategy=1; the second condition as Strategy=2, the third as Strategy=3, and so on..
In this way, i can optimize in the optimizer, the various strategies, by switching (stepping) simply the Strategy int value (0,1,2,3,4, etc..)
(in the same fashion can be created StrategyForOpen=1,2,3,4..; StrategyForClose=1,2,3,4..; StrategyForModify=1,2,3,4.., or more
detailed in example StrategyForOpenLong=1,2,3,4...; StrategyForCloseShort=1,2,3,4..; StrategyForModifyLong=1,2,3,4... etc...)
I can understand that there are many way to do this.. with functions, or with many if, (don't know how to do with a switch..)
My propose, for who are interested, is to propose your ideas to make different version of this idea/code.
I remember that in mq4 i found a way to do this, but now with mq5 i think is quite bit difficult for me actually.
Thanks