Question about PositionsTotal() from a newbie

 

Within MetaEditor 5.00, I have inserted the following line into my EA code: 

NumOpenPosns = PositionsTotal(); 

On compilation, I get the following error message: "'PositionsTotal' - function not defined."  How do I fix this problem?  Isn't PositionsTotal a built-in function?

johnf35 

 
johnf35:

Within MetaEditor 5.00, I have inserted the following line into my EA code: 

NumOpenPosns = PositionsTotal(); 

On compilation, I get the following error message: "'PositionsTotal' - function not defined."  How do I fix this problem?  Isn't PositionsTotal a built-in function?

johnf35 

PositionsTotal() is an mql5 function, are you trying to use it with mql4 ?
 
HI 
I got this error in MetaTrader 4
Can you help me to solve this error?
 
   int PositionsCount = PositionsTotal();

This line is for this error

       'PositionsTotal' - function not defined              63 30

 
@Faraahin Delaaram #: I got this error in MetaTrader 4 Can you help me to solve this error?
 
   int PositionsCount = PositionsTotal();

This line is for this error — 'PositionsTotal' - function not defined              63 30

Did you not read the post before yours?

 
Faraahin Delaaram #: I got this error in MetaTrader 4 Can you help me to solve this error?

Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
          General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.