Job finished
Specification
Looking for expanding functionality of my existing Expert Advisor. I want to add several functions and editable graphic interface.
1. I want to add "Basket trailing stop/take profit" option. Bot uses basket for selling all open positions with fixed Take Profit levels. I want to add trailing to this.
2. I want to add BUY / SELL buttons (with size of position field) to the graphic interface – the open positions must have Expert ID corresponding to the current Expert Advisor.
3. I want to add second operating mode to the Expert Advisor – switched in the graphic interface.
Second mode is basically a well known "zone recovery algorithm". In this mode Expert Advisor opens pending order according to the parameters and recalculates it when data changes.
4. I want to add following options to recovery mode:
a) Distance: means distance from current average price level where EA opens it's recovery position
b) Multiplier: Multiplier of size of the position that the EA opens upon reaching either of the average price level
c) Take profit: Take profit level (in points) for the whole transaction
d) Break even: on /off – if price goes in profit but does not reach TP level and moves the other way around, if option is ON, the position should close. Note that if the price again moves into hedged direction, it should again open. Note that in many circumstances the price will already be below calculated entry point and EA should have a way of opening the position anyway, not skipping it.
e) Trailing start: Step in points when trailing option is activated
f) Trailing distance: Maximum allowed slippage from trailing start
5. I want to have editable graphic interface with these options, something like in the attached file
Zone recovery algorithm work:
1. Average buy price for either buy or sell positions is a starting point.
2. EA calculates entry point and size for opposing position based on "distance" and "multiplier" parameters.
3. EA calculates Take Profit levels based on the parameters Take profit / Trailing start / Trailing distance and closes all positions upon reaching the target (buys and sells)
4. Should the price turn in the opposite direction, upon reaching average buy price, EA will again open multiplied position and try to sell the whole batch for the combined profit
5. Should the price go into profit but
6. EA should recalculate if positions are closed or opened manually using graphic interface.
Additional info in the graphic interface:
1. Current active mode
2. average buy price
3. average sell price
4. weekly profit from normal mode trades
5. weekly profit from recovery mode trades