indicator not displaying properly

To add comments, please log in or register
Jean Francois Le Bas
461
Jean Francois Le Bas  

Hello


i got sometimes indicators that don't display what they should display properly.


For instance:

d


on another MT4 (the indi is in the attachement):

vbf

sometimes i got nothing displayed at all !

sa

it should display drawings all the time as shown here :

c

i tried to "debug" the problem and here is what i got :

the problem arises only on the MT4 instances situated on my main PC (i tried on VPS and the problem isn't there, all is displayed correctly but they use old MT4 version)

i tried 4 different MT4 instances, all on the main PC, with different brokers, some with tickstory tick data, some without, and the result is the same : weird & wrong display

the problem happens often with indicators created by MrTools or MLaden.

most of my usual indicators are displayed properly and work well.

i got latest build


Please help me solve this problem as i'm out of idea

thanks


Jeff

Mladen Rakic
105390
Mladen Rakic  

Nothing wrong with that indicator


Examples made without any change of the code. Just attached the indicator, turned the arrows display on and changed the time frames to symbols/time frames that supposedly do not work. As you can see, they do (work), and regardless how much I changed time frames, symbols and brokers, it worked as it should all the time. Check your settings and your tickstory tick data or use that thing that you used for comparison. All the best

Jean Francois Le Bas
461
Jean Francois Le Bas  
Mladen Rakic:

Nothing wrong with that indicator


Examples made without any change of the code. Just attached the indicator, turned the arrows display on and changed the time frames to symbols/time frames that supposedly do not work. As you can see, they do (work), and regardless how much I changed time frames, symbols and brokers, it worked as it should all the time. Check your settings and your tickstory tick data or use that thing that you used for comparison. All the best

ok could you please give me your MT4 version you're using ?


so i can try with the exact same version

thanks

Jeff

Mladen Rakic
105390
Mladen Rakic  
Jean Francois Le Bas:

ok could you please give me your MT4 version you're using ?


so i can try with the exact same version

thanks

Jeff

I used the version you have posted
Jean Francois Le Bas
461
Jean Francois Le Bas  

ok i got it working. I simply "debugged" the code.


i fixed two things :

1) there was a need to "SetStyle" 4 buffers

so i added

SetIndexBuffer(4,buffer1);SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(5,buffer2);SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(6,buffer3);SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(7,buffer4);SetIndexStyle(7,DRAW_LINE);

this fixed the external line not showing

but the display was still wrong


2) i noticed MaxH and MinL were always the same (which they obviously should not)

so i changed

double MaxH = Prices[ArrayMaximum(Prices,period,i)];
double MinL = Prices[ArrayMinimum(Prices,period,i)];

to

double MaxH = -EMPTY_VALUE;
double MinL = EMPTY_VALUE;
         
for (int j = 0; j < period; j++)         
{
    if (i+j < Bars)
    {
         if (MaxH < Prices[i+j])
              MaxH = Prices[i+j];
         if (MinL > Prices[i+j])
              MinL = Prices[i+j]; 
   }
}

(i just computed the max/min manually)


now it works.

i'm not saying your programming is wrong, right...the indis you put out are awesome but for some reasons it needs some changes on my machine...


this is strange

anyone knows what's happening?

thanks


Jeff

Jean Francois Le Bas
461
Jean Francois Le Bas  
Mladen Rakic:
I used the version you have posted

i'm talking about the software version, like mine is

v4 build 1121

26 April 2018

Mladen Rakic
105390
Mladen Rakic  
Jean Francois Le Bas:

ok i got it working. I simply "debugged" the code.


i fixed two things :

1) there was a need to "SetStyle" 4 buffers

so i added

this fixed the external line not showing

but the display was still wrong


2) i noticed MaxH and MinL were always the same (which they obviously should not)

so i changed

to

(i just computed the max/min manually)


now it works.

i'm not saying your programming is wrong, right...the indis you put out are awesome but for some reasons it needs some changes on my machine...


this is strange

anyone knows what's happening?

thanks


Jeff

I have no idea what version are you talking about

In the version that you have posted it clearly calculates like this (lines 198 and 199):

         double MaxH = Prices[ArrayMaximum(Prices,period,i)];
         double MinL = Prices[ArrayMinimum(Prices,period,i)];

There is nothing wrong with that code. Please check what changes did you attempt to make in the version(s) you are attempting to test, since in the version you too have posted there is no such thing as same MaxH and MinL

As of adding line style : ever since build 1090 that is what we all assume should be done and that is an issue of build 1090, not an issue of the code

Jean Francois Le Bas
461
Jean Francois Le Bas  
what build are you testing the indis on ?
Jean Francois Le Bas
461
Jean Francois Le Bas  
Jean Francois Le Bas:
what build are you testing the indis on ?

i ask that because my guess is you're using some old build and not the latest. The latest which seems to have some bugs regarding ArrayMaximum.

Also if you have no line issue as i had with the original code i posted (the one without "SetIndexStyle()") then you must use build before 1090. Otherwise you would have the same issues i'm facing.


Please use last build to see the wrong display and acknowledge the bug


Jeff

Mladen Rakic
105390
Mladen Rakic  
Jean Francois Le Bas:

i ask that because my guess is you're using some old build and not the latest. The latest which seems to have some bugs regarding ArrayMaximum.

Also if you have no line issue as i had with the original code i posted (the one without "SetIndexStyle()") then you must use build before 1090. Otherwise you would have the same issues i'm facing.


Please use last build to see the wrong display and acknowledge the bug


Jeff

Build 1126 (the latest there is - there is no newer than that)


Please read my previous messages : I have nothing to add to what I have already told. There is nothing to "debug" in that code (including the "i noticed MaxH and MinL were always the same (which they obviously should not)" part - please do not state things that are completely wrong as if they are true - for your further information and education please read the lines following those "infamous" lines 198 and 199 and please explain to all of us ignorants what are they checking there and why the statement that MaxH and MinL are always the same does not stand at all). The simple code lines that go like this :

         if (MaxH!=MinL && i<Bars-1)
               Values[i] = alpha*((Prices[i]-MinL)/(MaxH-MinL)-0.5+Values[i+1]);
         else  Values[i] = 0.00;

As of the the line style issue : that was clarified to all months and months ago what one should do in cases like that - check some old message on this same forum

In any case I rest my case and this is my last message regarding this "error" : once more I repeat - there is nothing to "acknowledge"  and nothing to "correct" in that code.

All the best

Fernando Carreiro
4298
Fernando Carreiro  
Mladen Rakic: I used the version you have posted

I can confirm the problem that the OP is reporting. It throws out an Access Violation in certain cases, especially on the lower tiemframes:

2018.09.16 17:56:21.776 Access violation read to 0x0F01C000 in 'C:\Trading\MetaTrader\Roboforex\MT4D2119309T\MQL4\indicators\CodeBase\Ehlers_Fisher_transform_2.5balerts9.ex4'

I don't use the indicator myself and was just curious about it when I started reading this thread and decided to test it.

I used the files provided by the OP for the test on MetaTrader v4 build 1121.

12
To add comments, please log in or register