I need an EA that has 7 possible entries based on 3 Moving Averages, the type of MA and period needs to be able to be changed in a user input (eg, SMA, EMA and the time period, eg 10 SMA, 100 EMA, 200 EMA). For reference I'll refer to these in the description, as MA1, MA2 and MA3.
Each of the 7 entry rules must be able to be turned on or off in the user input.
Option for EA to take trades, only LONG, only SHORT or both directions in user parameters.
The rules for a long trade are:
If Price Closes above MA1 and MA1 is rising, open long.
If Price Closes above MA2 and MA2 is rising, open long.
If Price Closes above MA3 and MA3 is is rising, open long.
If (Price Closes above MA1 and MA2) AND (MA1 and MA2 are both rising), open long.
If Price Closes above MA1 and MA3 and MA1 and MA3 are both rising, open long.
If Price Closes above MA2 and MA3 and MA2 and MA3 are both rising, open long.
If Price Closes above MA1 and MA2 and MA3 and MA1 and MA2 and MA3 are all rising, open long.
The rules for a short trade are the inverse, if price closes below the MA in question and MA is falling, enter short.
The indicator attached below determines whether a MA is rising or falling based on colour. It should be self explanatory, however if it requires clarification i'll clarify.
In terms of other trading rules, the EA will trade each of the above 7 rules each time a new signal appears, therefore, it may be in multiple trades of the same Rule assuming a new signal has formed properly.
The signal rule resets for a long trade if a) price closes below the MA or b) the MA reverses and goes from rising to falling, and then begins to rise again. For example if we were already in a trade based on rule 1, and price EITHER fell below the MA1 or the MA1 had fallen and the indicator had changed colour, and then price reversed in a began falling, and then reversed and triggered, rule 1 again, it would be trigger another trade. However, unless price fell below MA2 or MA2 started falling and then rose again, it would not trigger other rules.
If a trade for example is opened against rule 1, and then it takes profit, and rule 1 is was still valid, it would NOT re-enter until the MA cycle had reset AFTER TP as per above.
SL needs to be adjustable in the user parameters - a value of 0 means no SL is set.
TP needs to be adjustable in the user parameters - a value of 0 means no TP is set.
Lot size, either fixed or % of equity.
Autoclosure - integer value - of trade after a user defined amount of candles is required, a value of 0 means this feature is turned off.
Max Trade Per Rule - integer value - this will limit the system to having x amount of trades open for each individual rule.
Max trades per candle - There will be times where several of the 7 rules fire at once, and there needs to be an option to prevent 7 the trades opening at once (value must be changeable from 1 - 7).
Hedging is allowed, so the EA will be able to take both short and long trades at the same time.
I require the source code at the end of the project, and comments where each rule are would be appreciated.
I may require modifications and the addition of further rules later down the track, this is why it's important to have commented code so if you are unavailable to do the follow up work, another programmer with the same skills can save time and modify the code.
Please see attached file showing 10, 50 and 200 MA. Please note the resets and what constitutes a valid reset, it requires, two a minimum consecutive candles to close below the MA for a long, and the inverse for a short. Also there are times where the indicator changes colour momentarily for one or two candles, this does not constitute a change / reset. It requires 2 candles closed candles. When the indicator peaks, its not uncommon to see it it changed from red to blue on half the candle. (see right most note in chart) the indicator is only red for 1.5 candles, not the full two, it needs another candle close to be valid.
A question has been asked IF multiple trades are fired at once, and it exceeds the max number of trades per candle, the EA should trade in the following order, Rule 7, Rule 6.... Rule 1. Any trade rule that has been triggered by this, and exceeds the maximum trades per candle will then be deemed to be traded until a valid reset is seen.
Also, one further filter is required, a spread filter. AKA no trades if spread is > than x pips. (ranging from 0.0 (off) to whatever.
Normally i would be scalping so i want tight spreads, this number needs to be a double variable, not an interger, as i'd probably have it set to 0.7 or thereabouts.
Please Note: Unless further clarification is needed, I intend to award this project to my selected developer within 3 hours of the London Open on 25/07/2018. Please read everything thoroughly and ask me questions or revise offers if required due to additional requirements as specified.
15 freelancers are bidding on average $150 for this job
Hi There ! I am a professional expert. i understand what you need and i'm able to do your project . I have a wealth of experience in this field. If you want to fast and good results, you can hire me. Thanks .