Problems found during the back testing and can't find the root cause! - page 2

 

That's it,

Your indicator repaint, it one of the many version of fisher

=> Run Macd_sample EA, add your indicator on the screen while EA is running,

Pause the EA, double click on the indicator, it's not the same, it repaint

What you get is not what you see on the screen  

it work, but you cannot check that it does what it may just looking at the indicator,

 

 Edit :  The extern "period" is missing    :

   Joy1=iCustom(Symbol(),0,"Solar Joy",period, SolarIndex,1);
   Joy2=iCustom(Symbol(),0,"Solar Joy",SolarIndex,2);
 

mladen is a specialist of fischer :

https://www.forex-tsd.com/metatrader-4/474-fisher-12.html

You can test this indicator, almost the same that the "Solar Joy", I have added a line limit = 2 and -2


Add this part : 

extern int     RangePeriods=35;
extern double  PriceSmoothing=0.3;    // =0.67 bei Fisher_m10 
extern double  IndexSmoothing=0.3;    // =0.50 bei Fisher_m10
extern double SolarLimit=1;

void SolarJoy()
  {
  // HideTestIndicators(false);
   Joy1 = iCustom(NULL,0,"Fisher_m11",RangePeriods,PriceSmoothing,IndexSmoothing,4,1);
   Joy2 = iCustom(NULL,0,"Fisher_m11",RangePeriods,PriceSmoothing,IndexSmoothing,4,2);
   //Joy1=iCustom(Symbol(),0,"Solar Joy",SolarIndex,1);
   //Joy2=iCustom(Symbol(),0,"Solar Joy",SolarIndex,2);
  }

Files:
 
ffoorr:

That's it,

Your indicator repaint, it one of the many version of fisher

=> Run Macd_sample EA, add your indicator on the screen while EA is running,

Pause the EA, double click on the indicator, it's not the same, it repaint

What you get is not what you see on the screen  

it work, but you cannot check that it does what it may just looking at the indicator,

Dear ffoorr, I followed it but didn't see the indicator change or any difference there.
 
ffoorr:

 Edit :  The extern "period" is missing    :

 

 

Dear ffoorr, you can refer to the instruction of iCustom(): 

[in]  Custom indicator input-parameters, separated by commas.

The passed parameters and their order must correspond with the declaration order and the type of extern variables of the custom indicator. If the values of input parameters  is not specified, the default values will be used.

 

 Besides, I also tried to add the extern parameters however the testing result is same.

 
ffoorr:

mladen is a specialist of fischer :

https://www.forex-tsd.com/metatrader-4/474-fisher-12.html

You can test this indicator, almost the same that the "Solar Joy", I have added a line limit = 2 and -2


Add this part : 


Dear ffoorr,

 

Yes,  they are same. However, we still can't find where is the problem, right?

You can check the code that it's not a fisher indicator. The smoothing of current bar is based on previous bar. The indicator data of all previous bars are frozen already. 

 
ffoorr:

Dear JolyDragon,

Yes it is a fisher indicator, check the code, if you don't find the problem, I can't help 

Dear ffoorr, other friends, 

 

What's fisher indicator?

What's the kind of indicator that the past bars change with the current bar? That kind of indicator is a trick and can't be used by me. I mean "Solar Joy" isn't this kind of indicator. If not agree, please show the sentences of this kind of trick.

Thanks for your code modification, but it looks like not  very closed to this topic.

I have to find the root cause as I found the same issue with back testing on other custom indicators too.  

Dear ffoorr, did you test "Solar Joy" and "Trade Joy"? Could you please kindly test and let me know if you meet the same issue? Thank you very much! 

 

 

 

 


 

 

Gumai
 
jollydragon:

What's fisher indicator?

I mean "Solar Joy" isn't this kind of indicator.

  1. Fisher is a repainting indicator. That mean it doesn't show you the signal when the market did it. It shows you where you should have had a signal many bars previously. It looks good but you can't use it for trading.
  2. ffoorr: Your indicator repaint, it one of the many version of fisher
    ffoorr already told you it is that kind of indicator.
  3. Center of gravity is also repainting.
    It looks good at the signal (where I placed the vertical line)
    But It looked more like this when that bar formed.
    Many bars later


 

JollyDragon

 

Maybe each week, there is a new fisher indicator witch pop up from somewhere, maybe someone trying to lure client. The name of the indicator change, but the code is still the same.

This is because fisher indicator look good at first sight. But what you see on the image is not what you get when trading. Can you tell where you find the indicator  ?

I did not test the two, I made then work, bringing slight modifications. I have deleted all the hour and balance restrictions, and made the EA trade on bars 2 and 3, instead of 1 and 2.

 The EA open and close order on signal buy and signal sell, this won’t give good result with any oscillator, except when closing orders on profit, so I stopped there, I did not go further.

The root cause is inside the code, study the code.

 Here is an indicator and an EA :


PS : change the name of the indicator in the EA from SOLAR_JOY to SOLAR_JOY_A, it did not download the SOLAR_JOY, had to change the name ;-)

if it don't work comment this line :

 //  if((SignalAStartHour<SignalAEndHour && h>=SignalAStartHour && h<=SignalAEndHour) || (SignalAStartHour>SignalAEndHour && (( h<=SignalAEndHour && h>=0) || (h<=23 && h>=SignalAStartHour))))


Files:
 
ffoorr:


Can you tell where you find the indicator  ?

The root cause is inside the code, study the code.


Dear ffoorr,

 

I got the indicator by searching with google.com.

You are right that the code has problem as I observed the re-drawing of the indicator.  Please see the screenshots below. 

  

 

 Dear all,

 

I must have some mis-understanding on bars,buffers or indicator.

According to the code, I understand that every bar always is drawn based on previous bars at the left and thereby no re-drawing should happen. However, I really observed re-drawing already.  

Please refer to the indicator file enclosed below. The main content is only about 10 lines as I pasted here. 

No matter how I tried hard to analyze again and again, I can't find the issue code to re-draw the indicator lines and it must be out of my capability already.

May I ask a favor for you to suggest where the problem is? Thank you very, very, ..., very much!

 

   for(i=limit-1; i>=0; i--)
     {
      MaxH = High[iHighest(NULL,0,MODE_HIGH,period,i)];
      MinL = Low[iLowest(NULL,0,MODE_LOW,period,i)];
      price = (High[i]+Low[i])/2;
      Value = 0.33*2*((price-MinL)/(MaxH-MinL)-0.5) + 0.67*Value1;
      Value=MathMin(MathMax(Value,-0.999),0.999);
      ExtBuffer0[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*Fish1;
      Value1=Value;
      Fish1=ExtBuffer0[i];
      if(ExtBuffer0[i]>0) ExtBuffer1[i]=10;
      else ExtBuffer1[i]=-10;
     }
Files:
solarjoy.mq4  7 kb
Reason: