Getting enumaration expressions from Print()

 

I would like to print enumaration expressions, not integers, to the expert log.

For example, for the following code, is there a more smart way of doing this?

   PositionSelect("GBPUSD");
   Print(EnumToString((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE)));  
 
kemalturgay:

I would like to print enumaration expressions, not integers, to the expert log.

For example, for the following code, is there a more smart way of doing this?

It's how to do it. What is not smart enough ?
 

As a newbie in C++ and MQL, sometimes, I can not be sure that I'm writing the code as it should be :)

Reason: