I would like you to modify my expert advisor to include three TIMEFILTERS.
1ST DAILY TIMEFILTER - only parameter that allows the "DAILY" start and stop time of EA, 0 disable
2ND TIMEFILTER - stops and starts EA to avoid major news events, 0 disables parameter
3RD TIMEFILTER - stops and starts EA to avoid major news events, 0 disables parameter
The Expert Advisor I would like modified uses a martingale trading strategy or averaging strategy call it what you like.....
Due to this averaging strategy the most challenging aspect of the modification will be to understand the Expert Advisors code which is 2000 lines of code this will enable the coder to modify the EA so if stop time for any of the timefilters has expired and trades are still open then the expert advisor must continue with the trading strategy until all trades are closed.
Its not just a simple matter of modifying the code to enable and disable the EA at preset times you have to understand how the ea trades then you have to locate the section of the code where the internal EAs starts trading and work your magic there.
I think you have to create some form of loop or something like that.....
Since I'm not a coder I can only offer you my uneducated guidance It goes something like this
You have to understand the code how the Expert Advisor functions then create a loop that has to test for certain conditions namely
- has the STOPTIME parameters expired for any of the timefilters
- if yes - then are there any trades open
- if yes - then stop all internal expert advisors except (create loop) the internal expert advisors that are controlling these open trades
- and then allow these particular internal expert advisors to continue trading these open trades until they hit takeprofit value then
- disable these particular internal expert advisors
- also continuously checking if the actual time equals the START TIME for any of the TIMEFILTERS
- if yes then activate all internal Expert Advisor even if any open trades are still being traded by its internal expert advisor
It may appear easier for expert coders like yourself....