Работа завершена
Техническое задание
hi.
here is what I need. the inputs for grid:
first order to open: Buy, Sell, Both
order lot size
Stoploss in points, if 0 there is no SL
Takeprofit in points, if 0 there is no SL
Grid distance in points
magic number- have to work for all chart to use it for close all trades button
how should work a grid. We say I open Buy. set no SL and TP 50 point. grid distance 50.
market going up: when the grid trade reach a tp, trade will be closed immediately and replaced by new buy trade.
market going against me: when the trade reach a grid distance, first trade stay open and EA open new trade with same setting as first trade. n next stage (100 points) its open again another buy etc. On one grid distance is all the time just one trade in one direction. when the condition of market change and a third trade (or any) reach a TP that trade will be closed. Rest stay open till future action. So it can now second trade reach TP - same as before or market going again down so EA will open another trade in grid distance 50 point from last active trade.
if there is no more Buy trade - all closed on TP - EA will open new one straight away.
recovery trade:
recovery will be activate when number of grid trades is open in same direction ( for example 5 buy),
if I use example from above: there is first trade on start, 2nd on 50 points, 3rd on 100 points etc and I set a number 5 as start a recovery EA should open a recovery trade which will recover a trade with biggest lost - logicly the first one. Lot size will be automatically calculated from TP I set for recovery trade and an actual losse on the first trade. If the TP of recovery reached, EA will close the first grid trade and a recovery trade. If SL of recovery trade reached, EA close just a recovery. Recovery have to be opposite direction as a grid trades. Process for that first trade recovery will be repeated till not reached TP of recovery trade but always just on the point where was activate first time. After the first trade closed with recovery on TP, EA start watch after second, third .... trade and will activate a recovery again on distance of number of trade. There is always open just one recovery trade for one grid trade on market direction and currency.
recovery TP in points
recovery SL in points
Last thing is a button for close all trades from all charts on actual price.