Can anyone advise how to make input parameters by iCustom?

 
Can anyone advise how to make input parameters by iCustom?

Please see the attached picture.

Is this correct?

double indicator = iCustom(NULL,0,"indicator name",0,"Alert name",false,false,false,false,"alert.wav",0,1);
Files:
4323.jpg  62 kb
 

Normally it is necessary to write everything in order including "In_Ex" and "Alerts_Ex".

double indicator = iCustom(NULL,0,"indicator name",In_Ex,Amplitude,Alerts_Ex,AlertCaption,DisplayAlerts,EmailAlerts,PushAlerts,SoundAlerts,SoundFile,0,1);

However, you can omit all if you use the default setting.

double indicator = iCustom(NULL,0,"indicator name",0,1);

If you only want to change Amplitude, you have to add "In_Ex" and "Amplitude".

double indicator = iCustom(NULL,0,"indicator name",In_Ex,Amplitude,0,1);
 
Naguisa Unada:

Normally it is necessary to write everything in order including "In_Ex" and "Alerts_Ex".

However, you can omit all if you use the default setting.

If you only want to change Amplitude, you have to add "In_Ex" and "Amplitude".

Unasa san

Thank you for your adivice.

If I want to change only Amplitude, how can I set value for amplitude?

For example, if I want to make value =1000,

double Amplitude=1000;
double indicator = iCustom(NULL,0,"indicator name",In_Ex,Amplitude,0,1);

It is not working.  How should I fix?

 
input double    Amplitude = 2;
:
:
:
double indicator = iCustom(NULL, 0, "indicator name", "", Amplitude, 0, 1);

Specify null as a value of "In_Ex", because it's a string variable that you do not need to input.

 
kajironpu:
Can anyone advise how to make input parameters by iCustom?

Please see the attached picture.

Is this correct?

double indicator = iCustom(NULL,0,"indicator name",0,"Alert name",false,false,false,false,"alert.wav",0,1);

it`s quie simple.

first step: place "indicator name" in clean chart

second: save chart template

third: open template in appropriate text editor and search "indicator name".

You found all indicator arguments for iCustom with true order and values

 
Naguisa Unada:

Specify null as a value of "In_Ex", because it's a string variable that you do not need to input.

Now I understand that I can omit what I don't to need to input.  I was trying  to find the solution for long time, so now I am so happy. Thank you so much!


 
Maxim Kuznetsov:

it`s quie simple.

first step: place "indicator name" in clean chart

second: save chart template

third: open template in appropriate text editor and search "indicator name".

You found all indicator arguments for iCustom with true order and values

Hi, what a great idea to know parameters in template file! 

I have never known that I can read template files as a text.

Thank you so much for teaching me a wonderful idea!

 
Naguisa Unada:

Specify null as a value of "In_Ex", because it's a string variable that you do not need to input.

Una san

Sorry for my repeat question.

If I only want to "Push Alets" OFF,

Is this correct? There may be undeclared identifier.

double indicator = iCustom(NULL,0,"indicator name",PushAlerts,false,0,1);
 
kajironpu:

Una san

Sorry for my repeat question.

If I only want to "Push Alets" OFF,

Is this correct? There may be undeclared identifier.

No, you do not seem to understand yet.


1. In_Ex                ----Indicator Settings
2. Amplitude         0
3. Alerts_Ex          ----Alerts
4. AlertCaption     My Alert Name
5. DisplayAlerts     false
6. EmailAlerts       false
7. PushAlerts        false //<--- target
8. SoundAlerts      false
9. SoundFile         alert.wav


To change only the above "PushAlerts" setting from "false" to "true".


1. You must write all items from 1 to 7 in order.
2. You may omit 8 and 9.
3. From 1 to 6, you can write the default values as they are. However, you can write "" (null) to 1 and 3.
4. You must write "true" to 7 as a value to change.

double indicator = iCustom(NULL, 0, "indicator name", "", 0, "", "My Alert Name", false, false true, 0, 1);


However, if you have an indicator source file, it is easier to rewrite the default value than doing such a troublesome work.
 
Naguisa Unada:

No, you do not seem to understand yet.


1. In_Ex                ----Indicator Settings
2. Amplitude         0
3. Alerts_Ex          ----Alerts
4. AlertCaption     My Alert Name
5. DisplayAlerts     false
6. EmailAlerts       false
7. PushAlerts        false //<--- target
8. SoundAlerts      false
9. SoundFile         alert.wav


To change only the above "PushAlerts" setting from "false" to "true".


1. You must write all items from 1 to 7 in order.
2. You may omit 8 and 9.
3. From 1 to 6, you can write the default values as they are. However, you can write "" (null) to 1 and 3.
4. You must write "true" to 7 as a value to change.


However, if you have an indicator source file, it is easier to rewrite the default value than doing such a troublesome work.

Una san

Now I understand. Item #1 and #3 is string (comment) , so I can use "" (NULL).

At first I thought that I could  just type only what I want to change, but I had to write (parameter name) all of them.

Unfortunately I don't have the source file, so I will use this procedure.

I sometimes want to compare the result of indicators by changing parameters to optimize it.

We can't optimize parameter values for indicators by strategy tester just like EA, right?

So this is good way. Thank you so much.

 

My Indicator Has Paramers and Inputs. I understand how to parse parameters from reading this thread. How do i parse inputs?

I Tried : iCustom(NULL, 0, "IndicatorName", 200, PRICE_MEDIAN);

See image. 

Files:
11.JPG  17 kb
1122.JPG  19 kb
Reason: