How to code custom function with multiple input in same formal parameter?

 

Hello everybody.

Can I write my function like this.

//--- Set the visibility only PERIOD_M15 and PERIOD_H1
      ObjectSetInteger(0,highlevel,OBJPROP_TIMEFRAMES,OBJ_PERIOD_M15|OBJ_PERIOD_H1);

At the last parameter, we can input more than one value in the same parameter separate with "|".

Sorry for my English.

Regards.

Tassanai 

 
Tazzanai Sripamorn: Can I write my function like this. At the last parameter, we can input more than one value in the same parameter separate with "|".

Yes, but when in doubt try it and see what happens. You will get feedback from the compiler and from the runtime results quicker than waiting for a response here on the forum. You will learn quicker and gain more experience that way.