Tâche terminée
Spécifications
Hedge trader
I need an EA as we apply it starts trading as 1 buy n 1 sell at same time with spread price.
And increases lot size gradually and TP will be average price of all active orders plus TP pips excluding last active entry.
Suppose current price is bid: 1.5200 ask: 1.5202. so as we apply it will sell 1 lot @ 1.5200 and buy 1 lot @ 1.5202.
So according to Grid of 20 and TP : 18 if market moves up to 1.5220 the buy 1 lot will exit bcoz of TP and new 2 entries 2 buy and 2 sell will be active. 2 buy@ 1.5222 and 2 sell@ 1.5220. @ buy tp will be 1.5240 but 2 sell will not have any TP only last sell entry of 1 lot will have tp of 1.5182. market keep on moving up as it will hit 2 buy tp @ 1.5240 then again EA will take 2 entries. 3 buy @ 1.4242 and 3 sell @ 1.5240.
Now 3 buy will have TP of 1.5260 but 3 sell will not have any TP but the previously sell entries 1 sell@ 1.5200and 2 sell @ 1.5220 will have TP of average price plus 18 pips. Average price will be 1.5213 so TP for both 1 sell and 2 sell will be 1.5195.
When market goes more up 3 buy tp will met @ 1.5260 and EA will take again 2 entries 4sell @ 1.5260
and 4 buy @ 1.5262 now sell entry 1.5260 will not have any TP but rest 3 entries 1,2,3 lots will have TP of avg price of all 3 plus TP pips. In this way avg price will be 1.5240 and TP for sell entries will be 1.5222.
after 1.5260 when market will come back to 1.5220 then tp for 3 sell entries will met@ 1.5222. now there will be 2 active orders only. 4 buy@ 1.5262 and 4 sell @ 1.5260 so system will close by hedge these 2 orders and EA will reset seting from current price by taking 2 entries of 1 buy and 1 sell and will keep on repeating it same way either market goes up or down.
Inputs:
Lot size: .10
Grid size: 20
Total orders Up to: 40
Tp :20
SL :50
Equity stop: 1000
Slippage: 20
Magic No: 1234
Note: As tp for previous entry will met then EA will open new entry with increased lot size but only on the base of TP met.
Even u can remove input of Grid size(entry distance) because when tp will met then same time it will take 2 entries. Buy and sell same time. These 3 function should be called together. TP execution and new buy execution and new sell execution.