Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 738

 
noob1:
When checking on historical data (D1), there are no market orders, although in the history pending orders are placed and deleted.
See the log, maybe because of errors it doesn't open! Or the price does not reach the target before removal. Try to increase the time of deletion! You can try it on the hour, so you don't have to wait so long! By the way there are never any ticks at 0:00.
 

Guys, we need help, can this code be rewritten from a pro's point of view to make it better

if(AccountBalance()>=20)

{

Lot=0.02;

}

if(AccountBalance()>=30)

{

Lot=0.03;

}

if(AccountBalance()>=50)

{

Lot=0.05;

}

if(AccountBalance()>=70)

{

Lot=0.07;

}

if(AccountBalance()>=100)

{

Lot=0.10;

The switch operator?

 
korobok777:

guys need help, can this code be rewritten from a pro's point of view to make it better


You can just multiply it by 0.001 :)
 
vadynik:
You can just multiply it by 0.001 :)

but it's going to be a loaded program, too, you mean.

 

why the code does not appear in the message

when inserting the SRC

 
vadynik:
You can just multiply it by 0.001 :)
if(Balans()>30)
Lot=Lot*0.001;

 
korobok777:
double StartLot=0.01;
if(MathMod(AccountBalance(),10)==0) Lot=StartLot*AccountBalance()/10;
 
evillive:

Thank you so much, I'll look into it
 
evillive:

You have written something wrong.
 
korobok777:
Lot=NormalizeDouble(Balance*0.001,2);
Reason: