Anyone have any idea how to do this?
Rather than multiply by 2 or 3, 1.2.4.8 or 1.3.6.12
Martingale 1.1.2.4, 1.1.3.3
- Alpenkorps
- Trader
- Posts: 213
- Joined: Thu Dec 15, 2011 4:03 am
Re: Martingale 1.1.2.4, 1.1.3.3
1,1,2,4 or 1,1,3,3, works only when you have a better R:R than 1:1.
Lets say you have a R:R of 1:2, and your first order is 1 lot. If you lost, your second order could be 1 too, and if you win, you would make profit even covering the 1st loss.
Lets say you have a R:R of 1:2, and your first order is 1 lot. If you lost, your second order could be 1 too, and if you win, you would make profit even covering the 1st loss.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
I don't care, I'm still free, You can't take the sky from me
- Carioca
- Trader
- Posts: 49
- Joined: Sat Jun 09, 2012 12:12 am
Re: Martingale 1.1.2.4, 1.1.3.3
And I'm doing backtesting in White Box Slope using tick data of 99% truefx modeling.Alpenkorps wrote:1,1,2,4 or 1,1,3,3, works only when you have a better R:R than 1:1.
Lets say you have a R:R of 1:2, and your first order is 1 lot. If you lost, your second order could be 1 too, and if you win, you would make profit even covering the 1st loss.
So far backtesting 4 pairs in all they gave between 70-80% hit rate and it looks like 1.1.2.4 or 1.1.3.3 would very sure
I expect a code to add this function I only consequi and martingale default 1.2.4.8.
Code: Select all
double CalculateLotSize()
{
//Calculate Martingale lot size
if (!UseMartingale) return(Lot);
//Find most recent trade
if (OrdersHistoryTotal() == 0) return(Lot);
double SendLots = Lot;
for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
{
if (!OrderSelect(cc, SELECT_BY_POS, MODE_HISTORY) ) continue;
if (OrderSymbol() != Symbol() ) continue;
if (OrderMagicNumber() != MagicNumber) continue;
if (OrderProfit() < 0)
{
double LotStep = MarketInfo(Symbol(),MODE_LOTSTEP);
double digit = 0;
if (LotStep == 0.1) digit = 1;
if (LotStep == 0.01) digit = 2;
SendLots = NormalizeDouble(OrderLots() * MartingaleLotMultiplier, digit);
}//if (OrderProfit() < 0)
break;
}//for (int cc = OrdersHistoryTotal() - 1; cc >= 0; cc--)
//Check maximum lots allowed filter in the Martingale section
if (SendLots > MaxLotsAllowed) SendLots = Lot;
return(SendLots);
}//double CalculateLotSize(double price1, double price1)