how this functions work? Or are these functions working on MT5!

To add comments, please log in or register
Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  

SYMBOL_SESSION_BUY_ORDERS

SYMBOL_SESSION_BUY_ORDERS_VOLUME

Feng Guozheng
68
Feng Guozheng  
Ahmet Metin Yilmaz:

SYMBOL_SESSION_BUY_ORDERS

SYMBOL_SESSION_BUY_ORDERS_VOLUME

seems these are  CONSTANCE not Function

datas as argument to(of) Function will usually changes Function behavior or output. but some data is not easy  for remember or easy to read so that we use a symbol to instead of data.
for eg.   #define   PI    3.141592658
PI are constant.
Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  

https://www.mql5.com/en/docs/constant_indices


SYMBOL_SESSION_BUY_ORDERS

Number of Buy orders at the moment

SymbolInfoInteger

SYMBOL_SESSION_BUY_ORDERS_VOLUME

Current volume of Buy orders

SymbolInfoDouble

Documentation on MQL5: List of MQL5 Constants
Documentation on MQL5: List of MQL5 Constants
  • www.mql5.com
Signature of the function in whose body the macro is located. Logging of the full description of functions can be useful in the identification of overloaded functions Chart fixed position from the left border in percent value. Chart fixed position is marked by a small gray triangle on the horizontal...
Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  
Feng Guozheng:
seems these are  CONSTANCE not Function

datas as argument to(of) Function will usually changes Function behavior or output. but some data is not easy  for remember or easy to read so that we use a symbol to instead of data.
for eg.   #define   PI    3.141592658
PI are constant.

I mean they are standart constants in mql5

but always return zero as value

why?

Feng Guozheng
68
Feng Guozheng  
Ahmet Metin Yilmaz:

I mean they are standart constants in mql5

but always return zero as value

why?

i don't have mt5 installed.

but if you means Print(SYMBOL_SESSION_BUY_ORDERS); and get 0 that means they define  SYMBOL_SESSION_BUY_ORDERS stand for 0;

or you means invoke  SymbolInfoInteger(xxx,SYMBOL_SESSION_BUY_ORDERS) and get 0?

Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  

:)

//---
   long  BUYorders=SymbolInfoInteger(_Symbol,SYMBOL_SESSION_BUY_ORDERS);
   if(BUYorders==0) BUYorders=1; //for div on zerro
   long  SELLorders=SymbolInfoInteger(_Symbol,SYMBOL_SESSION_SELL_ORDERS);
   if(SELLorders==0) SELLorders=1; //for div on zerro
   double BUYvolume=SymbolInfoDouble(_Symbol,SYMBOL_SESSION_BUY_ORDERS_VOLUME);
   if(BUYvolume==0) BUYvolume=1; //for div on zerro
   double SELLvolume=SymbolInfoDouble(_Symbol,SYMBOL_SESSION_SELL_ORDERS_VOLUME);
   if(SELLvolume==0) SELLvolume=1; //for div on zerro
Feng Guozheng
68
Feng Guozheng  

i though it may return the orders number in the session - every connection means a session.

i read the manual,didn't get more info . but its desciption make me think like above.


so i open some tickets:




but it return 0 still :(

i am sure the network is not disconnect. maybe this is nothing about it?



Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  

yes

I was asked completly this too 

:)

bti4
52
bti4  

Hi,

My apologies if this has been address before:


Print(SymbolInfoDouble("EURUSD",SYMBOL_POINT)); is returning le-05

Print(SymbolInfoDouble("GBPJPY",SYMBOL_POINT)); is returning 0.001 which is correct


I cant understand why EURUSD and GBPUSD etc all return le-05?


MT5 version 5 build 1940.


Any help would be greatly appreciated

Feng Guozheng
68
Feng Guozheng  
bti4:

Hi,

My apologies if this has been address before:


Print(SymbolInfoDouble("EURUSD",SYMBOL_POINT)); is returning le-05

Print(SymbolInfoDouble("GBPJPY",SYMBOL_POINT)); is returning 0.001 which is correct


I cant understand why EURUSD and GBPUSD etc all return le-05?


MT5 version 5 build 1940.


Any help would be greatly appreciated


let's see the codes(script,MT4) and its outputs as below:

void dspmsg(string sym){
   Print("Symbol:",sym," ","Ask:",MarketInfo(sym,MODE_ASK)," ","Digits:",MarketInfo(sym,MODE_DIGITS)," Point:",MarketInfo(sym,MODE_POINT));
}

void OnStart()
{
   
   dspmsg("GBPUSD");
   dspmsg("EURUSD");
   dspmsg("EURAUD");
   dspmsg("USDMXN");
   dspmsg("OILUSD");
   dspmsg("XAGUSD");
   dspmsg("XAUUSD");
   dspmsg("BTCUSD");
          
}


outputs:

2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:BTCUSD Ask:6342.9 Digits:3.0 Point:0.001
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:XAUUSD Ask:1210.14 Digits:2.0 Point:0.01
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:XAGUSD Ask:14.2 Digits:2.0 Point:0.01
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:OILUSD Ask:60.39 Digits:2.0 Point:0.01
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:USDMXN Ask:20.32875 Digits:5.0 Point:1e-05
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:EURAUD Ask:1.56937 Digits:5.0 Point:1e-05
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:EURUSD Ask:1.13378 Digits:5.0 Point:1e-05
2018.11.10 03:23:00.289    testscript USDJPY,Daily: Symbol:GBPUSD Ask:1.29793 Digits:5.0 Point:1e-05


now you may notic that you may be in a mistake.

the answer is not to find 'which is correct'

the answer is that,the point value for different is not share the same value.

for EURUSD,if the price is 1.13378 and if it has to be change it have to be 1.13377 or 1.13379, change for 0.00001(that is 1e-05) at lease. 

change to 1.133781? no!

that 's what the 'POINT' defined.

Ahmet Metin Yilmaz
3149
Ahmet Metin Yilmaz  
bti4:

Hi,

My apologies if this has been address before:


Print(SymbolInfoDouble("EURUSD",SYMBOL_POINT)); is returning le-05

Print(SymbolInfoDouble("GBPJPY",SYMBOL_POINT)); is returning 0.001 which is correct


I cant understand why EURUSD and GBPUSD etc all return le-05?


MT5 version 5 build 1940.


Any help would be greatly appreciated

point = digit counts

GBPJPY has 3 digits after dot on the price but EURUSD has 5 digits after dots on the price

so both are correct

To add comments, please log in or register