what's wrong with iCustom ? - page 2

 

I repeat to keep things clear, The problem appears only when i call Laguerre value from H1.

otherwise without the RED line it works like a charm.

 
Just this second run it on GBPUSD daily and get 0 for daily and 0.9412 for hour
 

And your red line in OP has two parameters missing... have you changed that?

 
Viffer:

Just to be sure... the script I provided, did you change the parameters in icustom to match the input parameters for the indicator? I notice that the parameters in the version of laguerre are different from the one I just down loaded from codebase.


So does this still give the wrong result?




this one is OK
 
Viffer:

And your red line in OP has two parameters missing... have you changed that?


 
Yes, i posted the new one page 1, same problem
 if ( (iCustom(NULL,0,"Laguerre",0.66,9500,0,i) > 0.15) && (iCustom(NULL,0,"Laguerre",0.66,9500,0,i+1) < 0.15) 
      && (iCustom(NULL,PERIOD_H1,"Laguerre",0.66,9500,0,i) > 0.75))   //check for buy signal
      {
         CrossUp[i] = Close[i];

      }
      else if ( (iCustom(NULL,0,"Laguerre",0.66,9500,0,i) < 0.75) && (iCustom(NULL,0,"Laguerre",0.66,9500,0,i+1) > 0.75)
      && (iCustom(NULL,PERIOD_H1,"Laguerre",0.66,9500,0,i) < 0.15))   //check for sell signal
      {
          CrossDown[i] = Close[i];
 

check this out it should never give such signals H1 was above 0.75:



 

I'm going to have to defer I'm afraid, I had a look at it and loaded it up, It may have something to do with referencing bar i for a different time frame, but I'm not that good with indicators so don't really know how you get around that. Hopefully someone more experienced will be along in a minute.

Sorry I couldn't help

V

 
Viffer:

I'm going to have to defer I'm afraid, I had a look at it and loaded it up, It may have something to do with referencing bar i for a different time frame, but I'm not that good with indicators so don't really know how you get around that. Hopefully someone more experienced will be along in a minute.

Sorry I couldn't help

V




thanx for trying
 

Calling an iCustom on a period higher than the current requires a few things :

- Storing the higher period values with the original shift to a buffer 

- creating a 'transposed' shift from the higher TF to the smaller one; using Time[i] & iBarShift 

- filling the values to another buffer with the 'transposed' shift

- .... then you can do a valid comparison.

hth 

Reason: