Termos de Referência
Open Buy and Sell
input double StartLots = 0.1;
Maritnagle on both sides.
input double pipStepWin = 25;
input double pipStepLoss = 25;
Lot exponent on both sides
input double LotExponentWinning= 1;
input double LotExponentLosing= 2;
For losing side, tp is breakeven point + Takeprofit + Sread
For winning side
1. first 2 levels profit at breakeven + X pips
2. for levels more than 2, tp is the previous level. for examples after 4 levels entries, tp is level 3.
If things go bad in martinagle at certain level, there will be a hedge in the opposite direction. SO if the buys are losing, at level 5, it will hedge the trade.
extern double HedgeLineLevelBuy = 5;
extern double HedgeLineLevelSell = 5;
If one set is hedged in sell, there can be more sets based on MaxSets allowed.
input int MaxSetsBuys = 3;
input int MaxSetsSells = 3;
When a trade is hedged, it stores the retracement distance to TP.
If there is one hedged trade of buy side and one hedged trade from sell side, we will open the hedges and allow them to move. One will take profit and the other one gets hedged at that next level.
The max level for emergency stoploss is level 10.
So example is as follows
Enter long and short 0.1 lots each
at 25 pips up- Level 1, the buy takes another 0.1 and the sell takes a 0.2 with different tp levels as mentioned above.
at another 25 pips up is the Level 2, the biy takes another 0.1 and sell takes 0.4 and so on, with diff tp as mentioned above.
the buys and sell are irrespective of each other.
If it reaches level 5, that is 125 pips, the sells will get hedged with 0.1+0.2+0.4+0.8+1.6 = 3.1 lots.
This will be held with a note of the tp distance.
Another hedged buy is collected, as the market going in the reverse direction.
In the above 2 trades we close the hedges and allow the market to move. Let's say the market went up, the buy trade took profit and the sell trade went to level 6 and got hedged. It will wait for the next buy to be able to take profit.
This will repeat as many times as the emergency stoploss is croseed or when MaxSetsBuys || MaxSetsSells is exceeded.
Any information needed, kindly ask.