Can The 4 first bytes of a...

 

Hello .Happy new Year to all .

I am fidling around with the MqlParams , IndicatorParameters  and IndicatorCreate functionality .

For the default Enumerations : -not custom- ,for custom indicators

The MqlParams.type is of TYPE_INT , and the returned value is a long which could allow 4 bytes to be used to indicate which default enumeration is used in that particular setting.(i used the following function to detect that - its not there offcourse but the code will help understand what i mean) [test indicator is attached , its just a void with default enumarations]

    int handle=iCustom(Symbol(),_Period,"SimpleForEnums.ex5");
    printIndyParamsAnd4bytes(handle);
...
...

//print indy params and 4 byte marks 
void printIndyParamsAnd4bytes(int &handle)
{
    MqlParam params[];
    ENUM_INDICATOR indicator_type;
    int params_total=IndicatorParameters(handle,indicator_type,params);
    Print("Indicator Type : "+EnumToString(indicator_type));
    for(int p=0;p<params_total;p++)
    {
    Print("P["+IntegerToString(p)+"] DataType : "+EnumToString((ENUM_DATATYPE)params[p].type));
    //if type int feed to enum printer ? 
      if(params[p].type==TYPE_INT)
      {
      //separate int value first 4 bytes and int value last 4 bytes 
        long right4=params[p].integer_value;
        //left 32
        right4=right4<<32;
        //right 32 
        right4=right4>>32;
        int right_int=(int)right4;
        long left4=params[p].integer_value;
        //right 32
        left4=left4>>32;
        int left_int=(int)left4;
        Print("LeftInt ["+IntegerToString(left_int)+"] RightInt ["+IntegerToString(right_int)+"]"); 
      }
    }
    ArrayFree(params);
}
//print indy params and 4 byte marks ends here 

For custom enumerations i dont know what could be utilized . 

Ideally ,and if possible , could the MqlParams be extended to include more information ? 

Files: