Close prices array unavailable to compiler

 

https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpertbase/cexpertbaseclose

Suggests to me that there is a function called Close which returns the double of the price of the candle specified as an integer argument.

Great. And from the crumb, I see

MQL5 ReferenceStandard LibraryTrading Strategy ClassesBase classes for Expert AdvisorsCExpertBaseClose

It's part of the Standard lib.  So why is my compiler not finding it, or any other function under CExpert? 

I specify

#include <Expert\CExpertBase.mqh>

at the top of my EA, but compiler can't find the header find, and nor can I.


Anyone know?

Documentation on MQL5: Standard Library / Trading Strategy Classes / Base classes for Expert Advisors / CExpertBase / Close
Documentation on MQL5: Standard Library / Trading Strategy Classes / Base classes for Expert Advisors / CExpertBase / Close
  • www.mql5.com
Standard Library / Trading Strategy Classes / Base classes for Expert Advisors / CExpertBase / Close - Documentation on MQL5
 
strontiumDog:

https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpertbase/cexpertbaseclose

Suggests to me that there is a function called Close which returns the double of the price of the candle specified as an integer argument.

Great. And from the crumb, I see

MQL5 ReferenceStandard LibraryTrading Strategy ClassesBase classes for Expert AdvisorsCExpertBaseClose

It's part of the Standard lib.  So why is my compiler not finding it, or any other function under CExpert? 

I specify

#include <Expert\CExpertBase.mqh>

at the top of my EA, but compiler can't find the header find, and nor can I.


Anyone know?

Looks like I have to not specify the C.

#include <Expert\ExpertBase.mqh>

works.

But then it gives me a massive number 1.7...e+308.  I'll use CopyClose instead.

 
strontiumDog:

Looks like I have to not specify the C.

Right, there is a typo in the documentation.


#include <Expert\ExpertBase.mqh>

works.

But then it gives me a massive number 1.7...e+308.  I'll use CopyClose instead.

Yes it's better if you use the class only for these function.
 
angevoyageur:
Right, there is a typo in the documentation.


Yes it's better if you use the class only for these function.
cheers; it's always good to know it's not me..
Reason: