Trabajo finalizado
Tarea técnica
Job specification:
Modify the existing EA:
1) Add a new external parameter "CloseOnOppositeSignal" to manage the trade logics.
If CloseOnOppositeSignal = true (and CloseBuyLogic + CloseSellLogic is false), a new trade signal will close the existing position and opens an opposite position. Thereby the EA is always long or short in the market. If CloseOnOppositeSignal = false and CloseBuyLogic + CloseSellLogic = true, then the EA will follow the specified logic.
- Change the name of the double StopLossBuffer to TradeBuffer
- New buy logic: "Open Long" = if (dSignalLineShift2 > dSignalLineShift1 && dSignalLineShift0 >= (dSignalLineShift1 + TradeBuffer)) TradeTrigger="Open Long"
- New sell logic: "Open Short" = if (dSignalLineShift2 < dSignalLineShift1 && dSignalLineShift0 <= (dSignalLineShift1 - TradeBuffer)) TradeTrigger="Open Short"
2) Add a new Stop-Loss Function, the old stop loss function remains as a option:
When a new "open long" trade signal has occured, the function looks back a number of bars and returns the lowest low of that array. This value (minus the StopLossBuffer) is used for stop loss placement and to calculate position size if MoneyManagement is set to True.
When a new "open short" trade signal has occured, the function looks back a number of bars and returns the highest high of that array. This value (plus the StopLossBuffer) is used for stop loss placement and to calculate position size if MoneyManagement is set to True.
- Add external booleen value to EA, when True the EA uses the automatic stop loss function to calculate position size (when money management is set to true), and places stop loss orders.
- Add external integer StopLossBuffer (the number of extra pips to add to the stop loss).
- Add external integer BarsLookBack (the number of bars to look back and find the high or low value for that array)
- Make sure that the Stop-Loss function is calculated correctly for 5-digit brokers.
- Make sure that the Stop-Loss function works with both fixed lot trading and when MoneyManagement is set to true.
3) Make addition to the time filter:
- Add external booleen value and external setting for time interval. When True the EA will only open new trades if current time is between selected time interval (with reference to GMT).
4) Make sure that the EA will open trades (both long and short) on regular charts as well as on off-line charts which is receiving new ticks. (The current EA does not follow the present trade logic and mostly opens short trades).
5) Clean up/delete all code used for the "TickDataBase"-function which I don't need.
6) Change the iCustom setting so the EA uses a slightly changed indicator.
- Make FastPeriod and SlowPeriod as external parameter in the EA
Thanks,
Tomas