Does anyone have some code for Martingale next candle please
sergiodv: have code from EABuilder
|
|
|
Yeah, you're probably correct but it's what I use to learn as I am not a programmer and because of it, i have been able to do some nice things but it isn't a tutor so it's impossible to get help from it.
But thanks for your opinion. I'm sure it was intended.
Yeah, you're probably correct but it's what I use to learn as I am not a programmer and because of it, i have been able to do some nice things but it isn't a tutor so it's impossible to get help from it.
But thanks for your opinion. I'm sure it was intended.
Hi,
can anyone help with osme code to Martingale Binary Option EA on next candle.
I have code from EABuilder which will Martingale n next signal but I was looking to make this an option for next candle or next signal
This is the code from EABuilder..
Thanks
-------------------------------------------------------------------
extern double MM_Martingale_Start = 10;
extern double MM_Martingale_ProfitFactor = 1;
extern double MM_Martingale_LossFactor = 1;
extern bool MM_Martingale_RestartProfit = false;
extern bool MM_Martingale_RestartLoss = false;
extern int MM_Martingale_RestartLosses = 1000;
---------------------------------------------------------------------------------
double MM_Size() //martingale / anti-martingale
{
double lots = MM_Martingale_Start;
double MaxLot = MarketInfo(Symbol(), MODE_MAXLOT);
double MinLot = MarketInfo(Symbol(), MODE_MINLOT);
if(SelectLastHistoryTrade())
{
double orderprofit = OrderProfit();
double orderlots = OrderLots();
double boprofit = BOProfit(OrderTicket());
if(orderprofit + boprofit > 0 && !MM_Martingale_RestartProfit)
lots = orderlots * MM_Martingale_ProfitFactor;
else if(orderprofit + boprofit < 0 && !MM_Martingale_RestartLoss)
lots = orderlots * MM_Martingale_LossFactor;
else if(orderprofit + boprofit == 0)
lots = orderlots;
}
if(ConsecutiveLosses(MM_Martingale_RestartLosses))
lots = MM_Martingale_Start;
if(lots > MaxLot) lots = MaxLot;
if(lots < MinLot) lots = MinLot;
return(lots);
}