Congrats.
Hi, i need to chage the multiplier by increasing +1.
like this 0.01,0.02,0.03,0.04...++
double NR(double thelot)
{
double maxlots = MarketInfo(Symbol(), MODE_MAXLOT),
minilot = MarketInfo(Symbol(), MODE_MINLOT),
lstep = MarketInfo(Symbol(), MODE_LOTSTEP);
double lots = lstep * NormalizeDouble(thelot / lstep, 0);
lots = MathMax(MathMin(maxlots, lots), minilot);
return (lots);
}
double xlot(int m)
{
for (int i = 0; i < OrdersTotal(); i++)
{
if (!OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
continue;
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic ||OrderType()!=m)
continue;
dlot=OrderLots();
}
if(OrderType()==m)
//ylot=NR(Lots*MathPow(Multiplier,jumlahorder(m))); <<<------------this part how do i change that?
return(ylot);
}
Hi,
double Last_lot =Last_lot(); //get
double min=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
double Lotstep=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP);
int LotsDigits=(int)MathCeil(MathAbs(MathLog(Lotstep)/MathLog(10)));
// if(initial_lot<Lotstep) initial_lot=Lotstep;
double next_lot=NormalizeDouble(Last_lot+initial_lot,LotsDigits);
//ylot=NR(Lots*MathPow(Multiplier,jumlahorder(m))); <<<------------this part how do i change that?
- That not a multiplier, it's an increment.
- Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help
urgent help.Or pay someone. Top of every page is the link Freelance.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, i need to chage the multiplier by increasing +1.
like this 0.01,0.02,0.03,0.04...++
double NR(double thelot)
{
double maxlots = MarketInfo(Symbol(), MODE_MAXLOT),
minilot = MarketInfo(Symbol(), MODE_MINLOT),
lstep = MarketInfo(Symbol(), MODE_LOTSTEP);
double lots = lstep * NormalizeDouble(thelot / lstep, 0);
lots = MathMax(MathMin(maxlots, lots), minilot);
return (lots);
}
double xlot(int m)
{
for (int i = 0; i < OrdersTotal(); i++)
{
if (!OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
continue;
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic ||OrderType()!=m)
continue;
dlot=OrderLots();
}
if(OrderType()==m)
//ylot=NR(Lots*MathPow(Multiplier,jumlahorder(m))); <<<------------this part how do i change that?
return(ylot);
}