Trabajo finalizado
Tarea técnica
I need a Hedging EA.
1. Open Trade.
Buy Stop and Sell Stop set follow by the Highest (+Premium Pips), and Lowest (-Discount Pips) of the previous candle.
Example:
Setting as:
- +6 pips (Premium) of previous = Buy
- -6 pips (Discount) of previous = Sell
2. Martingale (2 levels).
- If continuer same direction, lot size in same.
Example:
Buy 1 = 0.01 lot
Buy 2 = 0.01 lot
Buy 3 = 0.01 lot until meet a Sell Trade or TP.
1st level Martingale Increase:
- If 1st is Buy 1 = 0.01 lot, and meet a Sell Trade, depend how many pips different to the 1st trade, if the different is 12 pips, the = 0.01 lot X 12 times (Sell 1 = 0.12 lot), minimum is 0.01 X 3 times.
2nd level Martingale Increase:
- After 1st trade lot size and 1st opposite lot size (1st trade lot size X different pips), all next coming opposite trade are 3 times increase of the last lot size. Until TP.
Example:
Buy (1st trade) =0.01 lot
Buy =0.01 lot
Buy =0.01 lot
Sell (1st opposite) =0.12 lot (different 12 pips)
Sell =0.12 lot
Sell =0.12 lot
Buy =0.36 lot (X 3 of last lot size increase)
Buy =0.36 lot
Sell =1.08 lot (X 3 of last lot size increase)
Sell =1.08 lot
Sell =1.08 lot … Until TP, and close all trades.
3. TP / Close Trade.
- If there is a few trades open, maybe previous hit TP already, only use the last open as a guild, either which one of the direction hit TP 1st, and close all trades include opposite trades.
Example 1, Ideal case:
Buy (1st trade) =0.01 lot
Buy =0.01 lot
Buy =0.01 lot
Sell (1st opposite) =0.12 lot (if different 12 pips)
Sell =0.12 lot
Sell =0.12 lot
Buy =0.36 lot (X 3 of last lot size increase)
Buy =0.36 lot
Sell =1.08 lot (X 3 of last lot size increase)
Sell =1.08 lot
Sell =1.08 lot (Hit TP, close all trades)
Example 2, Worst case:
Buy (1st trade) =0.01 lot
Buy =0.01 lot
Buy =0.01 lot
Sell (1st opposite) =0.12 lot (if different 12 pips)
Sell =0.12 lot
Sell =0.12 lot
Buy =0.36 lot (X 3 of last lot size increase)
Buy =0.36 lot (Hit TP, close all trades)
Sell =1.08 lot (X 3 of last lot size increase)
Sell =1.08 lot
Sell =1.08 lot
4. Input.
- Premium
- Discount
- 1st lot size
- 1st level Martingale Increase level (Automatic X 1st lot size)
- 2nd level Martingale Increase level (X ? times)
- TP
- No SL