Specification
I will pay 120$ for this, so I request the developer to re- explain the logic in short to me, so we can make sure it's what, to proceed with placing the order.
Logic is below-
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 = 5;
input int MaxSetsSells = 5;
When a trade is hedged, it stores the retracement distance to TP.
TakeProfit for hedged trades = 10 pips clear which is not including spread of the hedges.
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. We are opening opposite hedged trades together.
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.
when trades are not hedged, the dashed TP line to be visible on screen.
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.
Information to be displayed on the screen is
1. Lifetime profit of EA
2. Current open profit or loss
3. Account Drawdown
4. lowest drawdown till date
As the screenshot https://prnt.sc/ru71c9
4. No of hedged sets buy and levels of each separated by commas
5. No of hedged sets sell and levels of each separated by commas
Settings would have equity stop by dollar value or percentage. entry lots is 0.01, but could also have an option for percentage of free margin. option in true or false for start and stop hours.
4 buttons on the screen
1. bot on
2. close all trades ( only for the trades opened by EA)
3. shut down (where it closes existing positions, but doesn't take new positions)
4. hedge all (it will hedge the open trades before weekend or news).
5. another button to remove hedges placed by before button in 4.
One final setting fur drawdown. if drawdown exceeds X dollars, hedge all trades and turn bot off due to drawdown. we can press above button 5 to manually restart the bot. all buttons will have green and red to know present status.
In case of any doubts, kindly clarify with me.