Hi there coders, appreciate anyone's help with this paid task.
I will like to create EA for entering market on 2 MA lines cross over for buy and sell signals. EA will add on lots to winning positions(pyramid strategy).
The idea is to cut short losses, hit stoploss or breakeven and move on to next trade. Let profits run and even add on lots to winning positions.
EA will enter the first position on the MA crossover signal based on the user input lots (or optionally to use MM). There will be a stoploss set together with the first entry. The EA will not have martingale available( i do not need it).
EA will enter a buy position upon the fast MA crossing below the slow MA. At the same time, EA will set buy limit by the grid space(in pips) above the entry position (pyramid strategy) . How many levels of buy limit orders to set will depends on the input of user.
EA will set a stoploss on the first buy entry based on user input in pips. Subsequent limit orders will not have a stoploss.
EA will enter a sellposition upon the fast MA crossing above the slow MA. At the same time, EA will set sell limit by the grid space(in pips) below the entry position(pyramid strategy). How many levels of sell limit orders to set will depends on the input of user.
EA will set a stoploss on the first sell entry based on user input in pips. Subsequent limit orders will not have a stoploss.
Once position hits stoploss, it will close all open positions and wait for the next MA crossover signal to enter a new position.
There is no martingale. No need to include the need to add on lots for losing trades features.
As the EA already set the levels of entry limit orders in place, more lots will add on to the winning position as the limit orders are hit(position will increase as the EA catches the correct trend).
Trailing stops can be activated. Trailing stops can be set by user input. Once a winning position hits trailing stop, EA will close ALL current running positions and take profit. Trailing stops for buy positions will close all buy positions and trailing stops for sell positions will close all sell positions(if hedging is activated).
Option to turn on break even for all buy positions or all sell positions.
Break even for all buy positions: As lots are added on current winning positions, EA will set stoploss to break even price of average of all the buy positions added up.
Break even for all sell positions: As lots are added on current winning positions, EA will set stoploss to break even price of average of all the sell positions added up.
Handling conflicts of trailing stoploss and breakeven levels:
As there are 2 events that are controlling the same stoploss level,there seems to be a conflict.
- Trailing stopless will control the stoploss level
- Breakeven level will also control the stoploss level
Solution: Just let the EA trigger whichever events currently comes first. We can discuss more if you are not sure.
- Fast MA
- Fast MA mode
- Slow MA
- Slow MA mode
- Lot size or MM (0 for MM in %)
- Stoploss in Pips (0 to disable, or put option to enable and disable)
- Takeprofit in Pips (0 to disable, or put option to enable and disable)
- Trailing Stoploss in Pips (0 to disable, or put option to enable and disable)
- Average buy positions breakeven (True / False)
- Average sell positions breakeven (True / False)
- Number of pending buy limit orders
- Number of pending sell limit orders
- Hedging positions - Allow buy and sell orders at the same time?(True / False)
- Start Hour - Start trading hour
- Start Min - Start trading min
- End Hour - End of trading hour
- End Min - End of trading min
I am open for advice, maybe other indicators has better win rate than moving averages?