工作已完成
指定
In MQL5 I want an EA.
I want the bot to trade the breakout of the range 0500-0900 GMT.
NO Take profit
If ask is above the time range high then we enter a BUY
if bid is below the time range low then we enter a SELL
If buy then stop loss = the low of the time range.
If sell then stop loss = the high of the time range.
Trailing step(not trailing stop) = the total range between ENTRY and STOP LOSS. if range between entry and stop loss = X then I want the stop loss to STEP every X amount. the trailingstep should not be a fixed amount.
When we have reached 1R(100% of stoploss) in profit then close half of the position. The trailing step should move at this point as well because trailingstep = the range between entry and stoploss.
Only 1 position open at a time that day but lets say the trade still has not been close by the trailing step then its ok to have multiple position open if we get another signal the following day. Maximum trade 1 signal per day.
Inputs:
RISK:
Fixed lots
Percentage of Account balance
Percentage of Account equity
specific amount in USD. example - $100.00
TIME RANGE:( I want to be able to change it look at the range from 0100-1200 GMT.)
Time Start
Time Stop.
EQUITY PROTECTOR:( if account equity reaches X amount in loss then pause trades for 48 hours.)
Toggle this function ON/OFF
Amount in USD
Hours the EA pauses
EQUITY STOPPER:( if account equity reaches X amount in profit then turn off EA.)
Toggle this function ON/OFF
Amount in USD
I want error checking. for example the bot can only work during market hours etc..
Please provide the source code .mq5
Hopefully I made everything clear. Thank you.