Help using iCustom

 

Hi everyone,


I'm trying to use the iCustom command to take values from an indicator that I do not have access to the source code for. The indicator has a lot of settings, some of which are not numerical. I know that you have to pass the indicator settings to the indicator in iCustom, but I'm confused as to how to do this when you have things like colours, strings, filenames, booleans, etc. Here is the settings panel in question.


I'd appreciate any help you wizards of mql4 can give me!!


 
  1. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. You should encapsulate your iCustom calls to make your code self-documenting.
              Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum

  3. The strings are just comments for the pop up. You can just pass "" or the default value, e.g. "====== SETTINGS ======".
  4. Booleans are true and false.
  5. Colors are colors.
  6. You only need to pass what you need to change. The only thing that affects the buffer values are the Period and Multiplier. If you need to change them, pass "",newP,newM.
 
whroeder1:
  1. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. You should encapsulate your iCustom calls to make your code self-documenting.
              Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum

  3. The strings are just comments for the pop up. You can just pass "" or the default value, e.g. "====== SETTINGS ======".
  4. Booleans are true and false.
  5. Colors are colors.
  6. You only need to pass what you need to change. The only thing that affects the buffer values are the Period and Multiplier. If you need to change them, pass "",newP,newM.
Thanks for your reply. I wasn't aware I'd posted in the wrong place, apologies to the moderators. 

So if I don't need to change them how do I skip them. I basically only need to change the first two numerical values. Do I still need to pass the rest of the parameters, just as ""? Otherwise how does it know the difference between a parameter for the indicator and the shift value at the end. Or does it assume that the last two numbers are the buffer number and the shift?
 
DrBeardface:
Thanks for your reply. I wasn't aware I'd posted in the wrong place, apologies to the moderators. 

So if I don't need to change them how do I skip them. I basically only need to change the first two numerical values. Do I still need to pass the rest of the parameters, just as ""? Otherwise how does it know the difference between a parameter for the indicator and the shift value at the end. Or does it assume that the last two numbers are the buffer number and the shift?
double GetIndicatorValue(string IndicatorName, int timeframe, int buffer, int pShift = 1, int input1 = 10, double input2 = 3.0, int input3 = 3000){
   return iCustom(_Symbol,timeframe,IndicatorName," ",input1,input2,input3,buffer,pShift);
}
Reason: