工作已完成
指定
Please see below the order that needs to be changed. I need to change the code For the grid sections only. The SL options 1 & 2 & the one chart mode are working fine. Thank you so much!
I need to create an EA on MT4, that will manage the trades I set up manually, using the rules below.
One Chart mode (So can be run on multiple pairs from one chart) – Option to add in pairs for example; EURUSD,AUDUSD,
Grid, I need the grid to only come into affect when I place a manual trade, and the price moves against me. The grid will be there to open more trades, and change the TP originally set so it can average the trades into profit if needed. The advisor needs to remember the initial TP by manual order, and then, when opening the grid, calculate the break even price for all orders in one direction, and set the TP from this price. Also the grid does not affect the manual stop loss entered and only changes the initial TP set by manual when activated.
Grid option; (If True)
Step – How far trade moves in a loss before opening new trade
Lot size multiplier Multiplier – 1.0 = open the same size lots
Max open trades – Max trades it can open (This only applies for 1 pair at a time, and only 1 way i.e. buy or sell)
TP = Have an option how much profit the trades are in before they all close the same time (Lot multiplier will affect what BE is, for example, if doubling it's lot sizes it doesn't need to move as far). This TP only comes into affect once the first trade is opened by the grid.
I have attached an example as to what I'd expect from the Grid (In numbered order) if the trade goes into a loss.
SL option 1.
If true – when price moves in profit the same amount of pips as SL. Half of position is closed (For example, if trade 0.06 then 0.03 will be closed & SL is set to entry price. SL does not trail further but can be edited by the user.
SL Option 2.
If True - it follows the customisable rules below;
Set SL to entry price – Number of points before SL is moved to entry price (Break even)
(The stop loss must not follow trailing conditions, until the SL has been moved to entry (Trailing Trigger)
Trailing Distance – How far price has to move to trail SL
Trailing Step – How far prices moves when distance hit