struct member is undefined

 

Hi guys!

Recently I have tried to use some trade types to control the behavior of my advisor.

Here is a code snippet:

CPositionInfo* p = new CPositionInfo();

Alert(p.Identifier);

When I try to compile this code I get an error: 'Identifier' - struct member is undefined.


What's wrong here?

Thanks.

   
   

 

Have you includede needed file in the head of your source as it is shown in documentation ?  https://www.mql5.com/en/docs/standardlibrary/tradeclasses/cpositioninfo

   #include <Trade\PositionInfo.mqh>
Documentation on MQL5: Standard Library / Trade Classes / CPositionInfo
  • www.mql5.com
Standard Library / Trade Classes / CPositionInfo - Documentation on MQL5
Reason: