Hi FF Expert Coders!
Sorry if this is in the wrong section, please move to the right section if needed.
I am wondering if anyone can code up an EA that meets the below criteria. I have been experimenting with this and have had some success but it is far too manual to maintain especially on lower time frames and so I thought automating it would work. This needs to be done in MQL4 for MT4.
I have looked high and low all over FF and other forums and haven't been able to find something quite like this combination. I started to look into MQL to code this but it is far to complex and would take me waaaaay to long to get off the ground.
Indicator Criteria:
Indicator
Sorry if this is in the wrong section, please move to the right section if needed.
I am wondering if anyone can code up an EA that meets the below criteria. I have been experimenting with this and have had some success but it is far too manual to maintain especially on lower time frames and so I thought automating it would work. This needs to be done in MQL4 for MT4.
I have looked high and low all over FF and other forums and haven't been able to find something quite like this combination. I started to look into MQL to code this but it is far to complex and would take me waaaaay to long to get off the ground.
Indicator Criteria:
Indicator
- A single X EMA - 50 EMA
- Should be editable
Buy Criteria:
- If close [0] > EMA[0] and close[1] < EMA[1]
- Close Sell trade and enter buy trade - only 1 trade open at a time
Sell Criteria:
- If close [0] < EMA[0] and close[1] > EMA[1]
- Close Buy trade and enter sell trade - only 1 trade open at a time
Take Profit Criteria
- When Balance is greater than Max Equity by $x i.e. $10 (This can be in points or pips)
- I think MT4 updates equity on closed trades only and balance fluctuates on each tick. Hence Balance > Equity. Happy for advice on how this works.
- Or when a Buy or Sell is triggered then take profit/loss.
- This will occur when a new high is not met and thus we follow the Buy / Sell criteria
Stop Loss Criteria
- X pips / points - This could be 1000 or 0 for no stop loss. If there is a power outage or MT4 crashes then a SL would at least be a safety net.
- Break even or adjust stop loss to break even when the price is $x in profit i.e. $50 in profit then set SL to breakeven.
- This could be set in pips or points
Lots Criteria
- Start at x lots - 0.01,0.1, 1000 etc. (depending on forex or CFD instrument)
- Lots need to increment by x on a "losing" trade. For forex starting at 1000 lots increment by 1000 each new "losing" trade
- A "losing" trade is one where a trade closes via buy or sell criteria and there is no new equity high
- A winning trade in $$$/pips from a buy /sell criteria is still a losing trade for new equity high
- Reset lots to X (0.01, 0.1, 1000) if there is a new equity high
I would like to use this EA across Forex, Crypto, and CFD's so the lots and, TP/SL should be able to be adjusted accordingly.
If anyone has any other creative ideas to add that would be awesome.
Really appreciate any help here and hope this can help others.
Cheers,
Qw3rty