how to get value from datawindow from indicator using icustom

 

Hello, i need some help..

i'm trying to get the value from indicator using icustom but it return emptyvalue which is 214783647.. i already try different indicators but i can't figure out why this currency indicator return emptyvalue, anyone pls help since i'm not a real coder.. I attach the indicator file and the function i used to call the buffer


double GetIndicatorValueccfp(int buffer, int shift)
{

    return ( iCustom (
     
                              NULL,                                  
                              0,                                     
                              "\\CCfp",//File Path of indicator   
                              
                              //NEXT LINES WILL BE INDCATOR INPUTS                            
                             "EUR,USD,GBP,JPY,CHF,CAD,AUD,NZD",
                             "1,1,1,1,1,1,1,1",
                             "",
                             "EURUSD,EURCHF,EURJPY,GBPUSD,USDCHF,GBPJPY,GBPCHF,AUDUSD",
                             0,
                             60,
                             10,
                             true,
                             true,
                             true,
                             false,
                             false,
                             30,
                             200,
                             20,
                             20,
                             Green,
                             Red,
                             Magenta,
                             Blue,
                             Red,
                             Yellow,
                             Gray,
                             Green,
                             Brown,
                             Orange,
                             White,
                              //END FOR INPUTS
                                                               
                             buffer,//Index Buffer                                
                             shift                               
                              
                       ));

}  
Files:
CCfp.mq4  25 kb
 
Lee Benny Salim:

Hello, i need some help..

i'm trying to get the value from indicator using icustom but it return emptyvalue which is 214783647.. i already try different indicators but i can't figure out why this currency indicator return emptyvalue, anyone pls help since i'm not a real coder.. I attach the indicator file and the function i used to call the buffer

The parameters you supplied are wrong, because I get value when I try:

Print(iCustom(NULL,0,"\\CCfp",0,1));
 
Lee Benny Salim:

Hello, i need some help..

i'm trying to get the value from indicator using icustom but it return emptyvalue which is 214783647.. i already try different indicators but i can't figure out why this currency indicator return emptyvalue, anyone pls help since i'm not a real coder.. I attach the indicator file and the function i used to call the buffer


I would simply copy this list, and use it as parameters tp iCustom()

extern string  m = "--Moving Average Types--";
extern string  m0 = " 0 = SMA";
extern string  m1 = " 1 = EMA";
extern string  m2 = " 2 = SMMA";
extern string  m3 = " 3 = LWMA";
extern string  m4 = " 4 = LSMA";
extern int     MA_Method = 3;
extern string  p = "--Applied Price Types--";
extern string  p0 = " 0 = close";
extern string  p1 = " 1 = open";
extern string  p2 = " 2 = high";
extern string  p3 = " 3 = low";
extern string  p4 = " 4 = median(high+low)/2";
extern string  p5 = " 5 = typical(high+low+close)/3";
extern string  p6 = " 6 = weighted(high+low+close+close)/4";
extern int     Price = 6;//0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4
extern int Fast = 3;
extern int Slow = 5;
extern bool USD = 1;
extern bool EUR = 1;
extern bool GBP = 1;
extern bool CHF = 1;
extern bool JPY = 1;
extern bool AUD = 1;
extern bool CAD = 1;
extern bool NZD = 1;
extern color Color_USD = Green;
extern color Color_EUR = Aqua;
extern color Color_GBP = Red;
extern color Color_CHF = Chocolate;
extern color Color_JPY = Maroon;
extern color Color_AUD = DarkOrange;
extern color Color_CAD = Purple;
extern color Color_NZD = Teal;
extern int Line_Thickness = 2;
extern int All_Bars = 200;
extern int Last_Bars = 0;
extern int Y_Top = 14;
extern int Y_Step = 15;
extern int TxtSize = 10;

removed extern .... 
or declare all these as your variables and use them for iCustom()

good luck.

PS: You need to supply all parameters in that order to iCustom().

 
  1. Soewono Effendi: I would simply copy this list, and use it as parameters tp iCustom() PS: You need to supply all parameters in that order to iCustom().
    extern string  m = "--Moving Average Types--";
    extern string  m0 = " 0 = SMA";
    ⋮

    Except you missed the first extern:

    extern string Indicator_ID = "CCFpcv:";
    int Objs = 0;                        
    //----                               
    #property indica tor_separate_window 
    #property indicator_buffers 8        
    extern string  m = "--Moving Average Types--";
    ⋮

  2. Lee Benny Salim:I attach the indicator file and the function i used to call the buffer
    You should encapsulate your iCustom calls to make your code self-documenting.
              Detailed explanation of iCustom - MQL4 programming forum

 
Lee Benny Salim:

Do not double post.

I have deleted your duplicate post.