Download MetaTrader 5

Order Close error 138 BACKTEST - page 2

To add comments, please log in or register
Vasyl Nosal
19403
Vasyl Nosal  
GumRai:
input int Slippage=5;
int Maxslippage;

.

   MaxSlippage=Slippage;
   Pips=Point;// 0.0001 and 0.01 on old broker or .00001 and .001 on new broker
   if(Digits==5 || Digits==3)   //0.00001 becomes 0.0001 and 0.001 becomes 0.01
     {
     Pips*=10;
     MaxSlippage*=10;
     }

Wrong. Only way(for now) is to cretae user setting point_koef=10; 

and than use Point*point_koef

 

Keith Watford
Moderator
10570
Keith Watford  
eevviill:

Wrong. Only way(for now) is to cretae user setting point_koef=10; 

and than use Point*point_koef

 

 

 

Not wrong unless you think that 1 pip is not 0.0001 for 4 digit symbols
Vasyl Nosal
19403
Vasyl Nosal  
GumRai:
Not wrong unless you think that 1 pip is not 0.0001 for 4 digit symbols

USDRUB has 4 digits, so your construction of tranforming to pip will be ignored(3 or 5).

So it is mistake. 

 

P.S. 1pip for USDRUB=0.001 

Keith Watford
Moderator
10570
Keith Watford  
eevviill:

USDRUB has 4 digits, so your construction of tranforming to pip will be ignored(3 or 5).

So it is mistake. 

 

P.S. 1pip for USDRUB=0.001 

As I said

Not wrong unless you think that 1 pip is not 0.0001 for 4 digit symbols

I consider 1 pip to be 0.0001

Vasyl Nosal
19403
Vasyl Nosal  
GumRai:

As I said

Not wrong unless you think that 1 pip is not 0.0001 for 4 digit symbols

I consider 1 pip to be 0.0001

As you wish. 

Use function that will works not in all pairs. 

Zirkon
121
Zirkon  
eevviill:

As you wish. 

Use function that will works not in all pairs. 

you are the most "funny" guy here around.

All these debates around a pip are waste of time, a pip is what the trader want it to be.

12
To add comments, please log in or register