Common functions does not appear on MQL5

 

When i type "P" for example the suggested words are 

-PERIOD_X

-PLOT_X

-POINTER_C

-PRICE_X

-PROGRAM

but i need the PositionGetTicket() function, but the editor does not recognize this function and send me the "function not defined" error, so y need to include someting or what i do wrong?

 
Try typing Pos
 

This is part of my code:


int operacionesAbiertas = OrdersTotal();

   ulong ticket;

   for(int i=0;i<operacionesAbiertas;i++)

   {

     ticket = PositionGetTicket(i);

   }


but the "PositionGetTicket(i)" throw the function not defined error

 

Please use the </> button to insert your code.

Try

int operacionesAbiertas =PositionsTotal();

 
Christian Arcadia:

This is part of my code:


int operacionesAbiertas = OrdersTotal();

   ulong ticket;

   for(int i=0;i<operacionesAbiertas;i++)

   {

     ticket = PositionGetTicket(i);

   }


but the "PositionGetTicket(i)" throw the function not defined error

Did you defined Trade operations in the beginning of your Code?


#include <Trade\PositionInfo.mqh>
#include <Trade\Trade.mqh>