Download MetaTrader 5

What is the root cause? Why not consistent?

To add comments, please log in or register
moonsboy
889
moonsboy  

Please let me create a new thread for this topic as there are too many versions of code in the old thread.

I've updated the code files as the latest versions as enclosed. 

 

1. According to the EA, an old order should be closed and a new order should be open just 1 bar later than the signal.

    However, the back testing still isn't consistent with the indicator signals and please refer to the screenshot below.

2. Besides, there is another issue that the first order during back testing is always later than the first signal for 2 signals.  

 

Who can help tell the root cause? Thanks a lot in advance.  

 

 

Files:
tradebjoy.mq4 12 kb
whroeder1
14780
whroeder1  
jollydragon: Who can help tell the root cause?
  1. Don't double post. 
  2. Your code is broken.
  3. Asked and answered, put Print statement with variable values, before and inside your ifs and find out why.
moonsboy
889
moonsboy  
WHRoeder:

  1. Don't double post. 
  2. Your code is broken.
  3. Asked and answered, put Print statement with variable values, before and inside your ifs and find out why.

This isn't double post as the indicator was updated. 

Did you really see the indicator updated or the root cause? Which "if" would you suggest to put "Print"? 

moonsboy
889
moonsboy  

Please refer to the replies from another forum. Any comment is welcome! 

U can never solve this problem the reason is that: all indicator are liers
example: you said: the first order during back testing is always later than the first signal for 2 signals.
this is because the indicator is a lier!!!
in fact there is a time lag in the indicator, it waits untill the next candle is formed, if the candle was bullish it say, Yeah I am bullish too !!! 
if the next candle was bearish, the indicator pretend it was also bearish, in fact the indicator waits untill the next movement of price is done then it adapt itself to the movement and pretend it was a true prediction

all indicators have these two problems:
1: they repaint
2: they are time lagged
80% of traders have been fooled by not knowing this two factor and trust indicators
(very soon one of them comes and insult me here the reason is he can not understand the tuth, the reason is he can't understand how indicators are forming)

it is not your indicator issue 
it is all indicators issue
they have lag= they draw the past, not now not future
it is impossible to write a correct indicator which doesn't have lag or doesn't repaint
the reason is : indicators are only another painting of past, they are not prediction of future

so don't waste your time on changing indicators to ea
moonsboy
889
moonsboy  

If the comment from another forum above is correct, MetaQuotes team is too rubbish because you waste much time of so many forex traders !!!!!!!!!!!!! 

Keith Watford
Moderator
9641
Keith Watford  

I believe that you may have sorted out the repainting of your indicator, so maybe you should look to your EA for the fault.

Make absolutely sure that the indicator being called by the EA is the latest version of your indicator

I don't know why you have this as an extern

extern double SolarLimit=9.1;

 but even so, it seems strange that you have it default as 9.1 when the last indicator returns either +3  or -3

If left at default no signals will be taken from the new indicator 

moonsboy
889
moonsboy  
GumRai:

I believe that you may have sorted out the repainting of your indicator, so maybe you should look to your EA for the fault.

Make absolutely sure that the indicator being called by the EA is the latest version of your indicator

I don't know why you have this as an extern

 but even so, it seems strange that you have it default as 9.1 when the last indicator returns either +3  or -3

If left at default no signals will be taken from the new indicator 

 

 

Dear GumRai,

 

I only updated indicator. For EA, the value is 2.1 instead of 9.1 in my side for testing. The value is ok to be any one between 0 and 3 to detect the signal of the indicator. 

But so far I still haven't analysed  out the root cause. I'm so frustrated now!

moonsboy
889
moonsboy  

Dear GumRai, WHRoeder,

 

I watched the M1 charts with the indicator previously updated in my first post above for hours today and never found the re-painting again. Thank you very, very much !!

However, the issues with back testing in my first post still exist and I can't find out the root cause.

May I ask a favor for you to help me further! Thanks again!

 

P.S. I can't update post 1 and let me highlight here:

The issue 1 only happens seldom during back testing. However, it exists and not reasonable. 

 

moonsboy
889
moonsboy  

Today I tested it again. Completed 51 trades on EurUSD M30.

3 trades(previous close and new open for 1 trade) happened 1 bar earlier. 1 Trade 1 bar late. Most happened at random time on Mondays.

There's 1 time that EA ignored 2 continuing signals.

 

Any friends can help on the consistence between EA trades and indicator signals? Please !

ffoorr
1047
ffoorr  

fisher indicator are messy,

It is calculated this way f(i) = f(i+1);

it take the previous value to calculate the actual, so the result depend of the calculations, as well as what is see on the chart.

if you fix it then you get the Ehler fisher transform, posted earlier.


if you absolutely want to use this indicator, then once you get a signal on bar 1 (or even 0), go and see if the signal is still there, on bar 2, to check it the indicator as repainted.

If the signal is not there on bar 2, close the order you took on bar 1 or 0.

This way, you get the advantage of this indi, I hope if will help   ....  

moonsboy
889
moonsboy  
ffoorr:

fisher indicator are messy,

It is calculated this way f(i) = f(i+1);

it take the previous value to calculate the actual, so the result depend of the calculations, as well as what is see on the chart.

if you fix it then you get the Ehler fisher transform, posted earlier.


if you absolutely want to use this indicator, then once you get a signal on bar 1 (or even 0), go and see if the signal is still there, on bar 2, to check it the indicator as repainted.

If the signal is not there on bar 2, close the order you took on bar 1 or 0.

This way, you get the advantage of this indi, I hope if will help   ....  

 

Yesterday I watched 4 M1 charts for hours and didn't observe any re-painting of the indicator.

Although the indicator use f(i+1) when calculating f(i), f(i+1) was frozen and no re-painting again.

Now you still think my updated indicator is re-painting indicator, please point out the code causing the re-painting.

Thanks for help.

12
To add comments, please log in or register