What is difference between these 3 methods of calling?

 
iHigh(NULL,0,0);
iHigh(_Symbol,_Period,0);
iHigh(Symbol(),Period(),0);
 
Arpit T: What is difference between these 3 methods of calling?


None.

  1. Reading the documentation, NULL gets replaced with current chart symbol. Zero means PERIOD_CURRENT and get replaced with the current chart period.
  2. Until a few years ago, the predefined variables did not exist in MT4; you had to use the function call versions.
  3. Be careful with NULL.

    1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
    2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
    5. Cloud Protector Bug? - MQL4 programming forum (2020)
 
William Roeder #:


None.

  1. Reading the documentation, NULL gets replaced with current chart symbol. Zero means PERIOD_CURRENT and get replaced with the current chart period.
  2. Until a few years ago, the predefined variables did not exist in MT4; you had to use the function call versions.
  3. Be careful with NULL.

    1. On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
    2. Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
    3. Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
    4. MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
    5. Cloud Protector Bug? - MQL4 programming forum (2020)
hey, you seem like someone that could help me, would you mind either having a look at my thread from today or going into dms for a minute?
Reason: