Job finished
Specification
Hi….
I need a hedging Ea. It should place orders like this…
For example:
· lot 1 buy at 1.12200
· lot 2 sell stop at 1.12100
· lot 4 buy stop at 1.12200 like this.
Required parameters are
1.Manual order (true/false)
2.Initial order (true/false)
3.Intial order (drop down box)
4.Initial gap size (changable)
5.Initial lot size (changable)
6.Take profit (changable)
7.Stop loss (changable)
8.Hedging multiple size (changable)
9.Trailing (changable)
10. Max batches (changable)
11.Max orders (changable)
The details of the parameters are
1. Manual order
True………. When I place manual order then only It will place hedging pending order. Otherwise It should not place any pending orders.
False……… It should check 2nd condition
2. Initial order condition
True……… It should check 3rd condition
False……..It should check 4th condition
3. Initial order
This is a dropdown box. It contain buy and sell options. If 2nd condition is true and I select buy in 3rd condition. When the export advisor is turn on, it should place buy order immediately. And also after hitting take profit (Last entry) it should place buy entry.
4. Initial gap size= 100 (changable)
When 2nd condition is false Ea should check 4th condition.
Here I can edit any numeric number. Now window in H1 candle
At 1’o clock market in 1.12560. Initial gap size is 100. Ea should place buy stop at 1.12660. sell stop at 1.12460.
At 2’o clock market in 1.12520. buy stop and sell stop still remain. Now ea should change buy stop at 1.12620. sell stop at 1.12420. (Ea should work in all time frames.)
Ea should change buy stop and sell stop for each candle in all the time frames.
(Note: If market take buy order then sell stop should close automatically.)
5. Initial lot size (changeable)
6. Take profit (changeable)
7. Stop loss(changeable)
Stop loss is a hedging point. For example buy order in 1200.210. Stop loss is 100. Ea should place sell stop at 1200.110.
8. Hedging multiple size (changeable)
Normally hedging lot size sequence is 1,2,4,8,16,32,64…etc
Last order multiple by 2.
But If hedging multiple size is 1.5. then the sequence is 1, 1.5, 3, 6, 12, 24…etc
One more example hedging multiple size is 1.7. then 1, 1.7, 3.4, 6.8,….etc
First order always initial order mentioned in 5th parameter.
Second order is 1st order into hedging multiple size. (1*1.5=1.5)
(Note: default 2)
Third order onwards last order multiple by 2. (1.5*2=3, 3*2=6)
9. Trailing (changeable)
Trailing start
Trailing step
10. Maximum batches (changeable)
1st order –buy- hit by stop loss
2nd order -sell -hit by stop loss ONE BATCH
3rd order -buy -hit by take profit
For example :
If 2nd condition is true. 3rd condition is buy. Max batch 2. Stop loss 100.
Take profit 200.
1st order buy at 1.12400- SL 1st batch
2nd order sell at 1.12300-SL
3rd order buy at 1.12400-SL
4th order sell at 1.12300-TP at 1.12100.
2nd condition is true so buy order placed at 1.12100.
1st order buy at 1.12100-sl 2nd BATCH
2nd order sell at 1.12000-tp
After that Ea should not place any order. Because max batch is 2.
11. Maximum orders (changeable)
If maximum order is 3.
1st order buy at 1.12400- SL
2nd order sell at 1.12300-SL
3rd order buy at 1.12400-SL
Maximum order is 3. So Ea should not place further order even 3rd entry hit to stop loss.