Fisher Indicator - page 2

 
paul.seldon:

If you want to do previous one, then it should be i-1, isn't it?

Please DO correct me if I am wrong. This "FOR-LOOP" is incrementing not decrementing.

enclosed modified Fisher.mq4

No. The most recent (forming) bar is 0, the last bar is 1. i-1 is looking at a future bar's value to calculate the previous one. That is repainting. That is why Fisher is useless for trading. What you see currently is not what you'll see bars later.

Did I not say "Count down, create an Buffer and remember Value1 for next bar"? You didn't create a buffer, you created a zero length array called Buffer.

I've outlined what needs to be done to stop the repainting. Change it and you'll find that Fisher is useless.

You could have also Googled fisher non-repaint and found many

  1. #18 (Swing Strategy) | Forex Strategies & Systems Revealed
  2. Fisher - Page 28 @ Forex Factory

And discussions Repainting indicators

 
WHRoeder:

No. The most recent (forming) bar is 0, the last bar is 1. i-1 is looking at a future bar's value to calculate the previous one. That is repainting. That is why Fisher is useless for trading. What you see currently is not what you'll see bars later.

Did I not say "Count down, create an Buffer and remember Value1 for next bar"? You didn't create a buffer, you created a zero length array called Buffer.

I've outlined what needs to be done to stop the repainting. Change it and you'll find that Fisher is useless.

You could have also Googled fisher non-repaint and found many

  1. #18 (Swing Strategy) | Forex Strategies & Systems Revealed
  2. Fisher - Page 28 @ Forex Factory

And discussions Repainting indicators


Thanks ~ SIR ~
 

Sorry to open up this thread again... but... I do have one or two interesting points w.r.t Fisher...

What all of you are missing is: What is the Log of 1 (or 0.99 in the code)....? It's zero... 0...

So, what the code is doing is "protecting" itself from making a mistake... if ax[] (I think thats what is normally in the code) is between  0.99 or -0.99... any of the Fisher indicators won't give you an accurate result... but when it crosses 1 (-1) it will repaint the last 2 or 3 candles....  That's why it "repaints"....

Get rid of the Log function... setup the indi in an Include file and call it back into your EA.... BUT....

...BUT.... and I cannot stress this enough...

 Run your For loop backwards.... : for(i=0; i<=limit; i++)... and,  I know Roeder is going to shoot a cat.... but... that's the way it does not repaint...

...for Fisher... or whatevr your Fisher file is called... 

 

Then call your other indi's that rely on it forward.... ie:  for(i=limit; i>=0; i--)

It's actually a spot on... no-repaint "Top/Bottom" indi... but you need to work it... 

But, that's my opinion....

 

I don't think the fisher indicator is manageable,


I added this in the indicator, a vertical green line, when signal up :

 if( ExtBuffer0[i+2] <0 &&  ExtBuffer0[i+1] >0 ) 
   {
         ObjectDelete ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars );
        ObjectCreate ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJ_VLINE, 0 , Time[0], Close[0]);
        ObjectSet    ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJPROP_COLOR, Lime );
        ObjectSet    ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJPROP_WIDTH, 1 );
        WindowRedraw();
   }


And here is the result, the indcator is run in an EA backtest;

what you see on chart, and the difference between the place where the signal will be taken in EA.

I don't reaaly understand why.




Try this one, it give good signal and draw arrow on chart :

 

Made an error, depending where is placed the loop result are differents.

.

Now I placed a new loop outside the other loop :

The EA IS A MACD EA, orders do not matter



So now the fisher is manageable, it repaint with regularity one or two Bars.


So it is tradable, if no repainting is desired, take this fomula for buy :

if( ExtBuffer0[i+3] <0 &&  ExtBuffer0[i+2] >0 ) 
 (or this one : 
if( ExtBuffer0[i+4] <0 &&  ExtBuffer0[i+3] >0 ) 


It has to be checked in an EA to see if it's OK.

Now, the fisher indicator give good signals, It repaint  sometime and the signal disapear (fade away), but not all the time just sometime.

So to keep the edge, (the advantage ) given by fthe fisher indicator, one's has to take all the signal given by the fisher on Bar 1, but there after it is neceesary to go and see, for every signal, if the indicator has repainted or not, meaning : if the signal is still there or not.

To do so, Store the signal when it show up : store the bar, (bar = Bars;), and go and see on bar +1 (if (Bars = bar+1)  if the signal is still there (on Bars 2 now) or if the signal has disapeared, and same on bar 2, and that's it.


if( Bars == bar+1)
 {
 if( iCustom(NULL,0"fisher" .... signal_up_buffer,2) != 0.0 ) // ok signal still there
}} 

This should work.

If there is only one signal which repaint sometime, it's not a big matter. Well this has to be checked inside an EA.


    Fish1=ExtBuffer0[i];
    }
   //============================= this part only =================================================================
   for( i=0; i<limit; i++)
      {
    if( ExtBuffer0[i+2] <0 &&  ExtBuffer0[i+1] >0 ) 
      {
         ObjectDelete ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars );
        ObjectCreate ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJ_VLINE, 0 , Time[0], Close[0]);
        ObjectSet    ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJPROP_COLOR, Lime );
        ObjectSet    ("_Top_TF_L_Signal_"+ (string) i+ (string) Bars, OBJPROP_WIDTH, 1 );
        WindowRedraw();
      } }
 //===================================================================================================

   bool up=true;

if someone create an EA? please post result.

 

Here is the indi with buffer for signal  and an EA :




It don't see some order, so the order has to be closed by stop loss or takeprofit

#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
extern int period=10;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
  double signal_up = iCustom(NULL,0,"fisher",period, 3,1);
  
    if( signal_up != 0.0 )
         int L=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,"",452,0,0);

   
  }
//+------------------------------------------------------------------+
Files:
fisher_1.mq4  4 kb
Reason: