I'm not returning any value for this iCustom function.
I am trying to get the following value of Momentum
// Indicator Setup
//======================
SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,3);
SetIndexBuffer(0,Pos_Diff);
SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,3);
SetIndexBuffer(1,Neg_Diff);
SetIndexStyle(2,DRAW_LINE,STYLE_DASHDOT);
SetIndexBuffer(2,Momentum);
Momentum = iCustom(NULL, 0, Indicator, Momentum_Period, 2,1);
so i'm assuming i am not passing the parameter through correctly or maybe it's something different.
I've also tried this code to print values of all the indicators in the Indicator named Indicator and it's just returning 0.
int start()
{
{
int mode=4;
for(int cnt=0;cnt<=mode;cnt++) {
Print("Values = ",iCustom(Symbol(),0,Indicator,0,mode-1,0));
}
return(0);
Give me indicator full code and I help you...
I'm not returning any value for this iCustom function.
I am trying to get the following value of Momentum
so i'm assuming i am not passing the parameter through correctly or maybe it's something different.
I've also tried this code to print values of all the indicators in the Indicator named Indicator and it's just returning 0.
Please read some other posts before posting . . .
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
I'm not returning any value for this iCustom function.
If you don't want to use these default values for the Indicator you need to specify the values for them all in the iCustom() call . . .
extern int Boll_Period=20; extern double Boll_Dev=2.0; extern int Keltner_Period=20; extern double Keltner_Mul=1.5; extern int Momentum_Period=12; extern int Back_Bars=1000; extern bool Alert_On=true; extern bool On_Screen_Info=true;
If you don't want to use these default values for the Indicator you need to specify the values for them all in the iCustom() call . . .
So I put the all values into the parameters part in iCustom()?
So I put the all values into the parameters part in iCustom()?
pass your indicator name in quotes-like "Indicator".this may help.also pass the parameters to icustom in same number and order as declared in your custom indicator.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to get the following value of Momentum
// Indicator Setup
//======================
SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,3);
SetIndexBuffer(0,Pos_Diff);
SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,3);
SetIndexBuffer(1,Neg_Diff);
SetIndexStyle(2,DRAW_LINE,STYLE_DASHDOT);
SetIndexBuffer(2,Momentum);
Momentum = iCustom(NULL, 0, Indicator, Momentum_Period, 2,1);
so i'm assuming i am not passing the parameter through correctly or maybe it's something different.
I've also tried this code to print values of all the indicators in the Indicator named Indicator and it's just returning 0.
int start()
{
{
int mode=4;
for(int cnt=0;cnt<=mode;cnt++) {
Print("Values = ",iCustom(Symbol(),0,Indicator,0,mode-1,0));
}
return(0);