Announcement

Collapse
No announcement yet.

indicator not working correctly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • indicator not working correctly

    Hi-
    I'm having trouble getting this Fisher xform indicator to update accurately on my tick charts (any charts). Any ideas would be helpful.
    Thanks
    D.

    PHP Code:
    function preMain()
    {
        
    setStudyTitle("Fisher XForm");
        
    setCursorLabelName("Fisher"0);
        
    setCursorLabelName("Trigger"1);
        
    addBand(0PS_SOLID1Color.aqua);
        
    setDefaultBarFgColor(Color.green0);
        
    setDefaultBarFgColor(Color.red1);
        
    setDefaultBarThickness(1,0);
        
    setDefaultBarThickness(1,1);
    }
    var 
    Value1_1 0;
    var 
    Fish_1 0
    function main(Len) {
     if (
    Len == null)
      
    Len 15;
     
     var 
    Price = (high() + low()) / 2;
     var 
    MaxH 0;
     var 
    MinL 0;
     var 
    Fish 0;
     var 
    i;
     var 
    Value1 0;
     var 
    temp;
     
     for(
    0Leni++)
              if(
    == 0){
       
    MaxH high();
       
    MinL low()
      }else{
       
    MaxH Math.max(MaxHhigh(-i));
       
    MinL Math.min(MinLlow(-i));
      }
     
     
    Value1 .33 * ((Price MinL) / (MaxH MinL) - .5) + .67 Value1_1;
     
     if(
    Value1 .99)
      
    Value1 9.999;
     if(
    Value1 < -.99)
      
    Value1 = -9.999;
     
     
    Fish .5 Math.log((Value1) / (Value1)) + .5 Fish_1;
     
     
    Value1_1 Value1;
     if(
    getBarState() == BARSTATE_NEWBAR) {
      
    temp Fish_1;
      
    Fish_1 Fish;
     }
     return new Array(
    Fish,temp);


  • #2
    dido
    The simplest solution is to use the Fisher.efs that is posted here (which also works in multiple time frames)
    However if you are still interested in understanding why the version you posted is not working correctly I can guide you through fixing it
    Alex

    Comment


    • #3
      thanks

      thanks alex, that was helpful.
      D

      Comment


      • #4
        difference in scripts

        Alex-
        Any idea why and if there is a difference in the script Fisher efs and Fisher xform?
        I downloaded the updated link you attached for the Fisher efs and it appears to be similar but the new Fisher efs looks much more noisy(choppy) on my chart than the Fisher xform that I posted here earlier. I've tried adjusting the settings on the new one so it would match xform but can't get it to look the same. Maybe this xform is a slightly different script than the regular Fisher efs?
        Any ideas and thanks for your help.
        Dido

        Comment


        • #5
          dido
          Aside from the errors that cause the formula you posted to compute incorrectly in real time that formula is using the High and Low as MaxH and MinL regardless of the price source used whereas these should be the highest and lowest values of the price source (see here the original article by John Ehlers).
          Alex

          Comment

          Working...
          X