Spezifikation
Add martingale optional function to my existing EA. With Percentage you want recovered, over how many trades you want the recovery to be split into and maximum cycles of recovery attempts allowed.
Example - Normal trade is 10 sl 10 tp for this trade using 1 lot - this trade loses - example $100
I want a setting to choose how much percent of the loss I want to recover.
If I put in 100, means I want 100% of the lost trade recovered in the next trade(s) so $100 not including the normal trade size.
If I put in 50, means I want to recover 50% so $50 recovered in the next trade(s)
The lot used is dependent on sl and tp. In this example 10 pips is the tp. so we work out the lot size needed to produce $100 which is 1 lot for 100%
So In this example of needing 100%. 1 lot needs to be recovered for the loss in the next trade placed.
1 lot for recovery and 1 lot for the normal trade means the next trade lot size will be 2, to recover the loss plus take its normal trade.
Another setting choosing in how much trades will be used to recover the loss.
In previous example we used 1 trade to recover 100% of the loss.
Example if we want it to be recovered over 4 trades. the 1 lot which we need to recover will be split into 4, so 0.25 needs to be recovered 4 times.
0.25 lots for recovery plus 1 lot for normal trade means 1.25 lots for next 4 trades, if all trades win then this is the end of recovery and goes back to original
risk being used.
Maximum cycles stops loss and loss and loss. Example. If we are using 2 maximum cycles If EURUSD losses 1st trade at 1 lot.
The cycle is the attempt of recovery. So example 100% from 1 trade. original trade 1 lot loses. 1st cycle recovery trade 2 lot loses.
2nd and final cycle 4 lot trade loses. That ends the cycle as maximum attempts have been made and then it goes back to original lot sizes.
Outstanding balance needed to be recovered from previous cycle is added onto the new cycle
use recovery lot size.