Metatrader known bugs ... - page 78

 
mladen:
Metatrader 4 draws the body of the candle in that case as black (wrong too) They have that bug for tears and tears (also with histograms and arrows on chart) They never corrected it

PS: they (the errors) are still there in build 777 too

 

Build 777 : error that existed in backtesting regarding multi time frame indicators testing as well as the problems with offline charts still exist

 

They did the same way as always : new build, no explanation or documentation what have been changed or corrected. Work of amateurs

 

I discovered this in an indicator I downloaded and this was at the top of the code.

G e n e r a t e d by ex4-to-mq4 decompiler FREEWARE 4.0.509.5

Website: H T T p : / /W Ww. meT a q U O T es . Ne T

E-mail : SU P P O Rt@ M E TaQ u o T e S. ne T

Does this mean that MetaQuotes were actually supplying a free decompiler for their own software? or is this somebodies idea of a joke?

 

For a long time I was convinced that decompiler could come just from one source (the maker of the compiler). But I do not have proofs, so ...

 

A thing that used to work does not work any more

An example :

#property indicator_separate_window

#property indicator_buffers 1

#property indicator_color1 Red

double buffer1[],buffer2[];

int init()

{

SetIndexBuffer(0,buffer1);

SetIndexBuffer(1,buffer2);

IndicatorBuffers(2);

return(0);

}

int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);

for(int i=limit;i>=0;i--) { buffer2 = Bars-i; buffer1 = buffer2; }

return(0);

}[/PHP]

will not work

the problem is in this part :

int init()

{

SetIndexBuffer(0,buffer1);

SetIndexBuffer(1,buffer2);

IndicatorBuffers(2);

return(0);

}

if you change it to this :

[PHP]int init()

{

IndicatorBuffers(2);

SetIndexBuffer(0,buffer1);

SetIndexBuffer(1,buffer2);

return(0);

}

it will work. The order of execution s everything now, and you have to take care of the order of executing some order not just that the orders are executed at all. That will cause a lot of "phantom errors" since the old mt did not work like that in some cases. Debugging the existing code to be compatible with new mt is far, far from over

 

Guess what double OpenToday=iOpen(Symbols[k],1440,0); returns?

It's not Today's Open but around the open divided by the pairs points. The difference may be the spread

For XAUUSD today, the Open using Open is 1202.07 and iOpen returns 120212.0 for a difference of 5 pips.

The really GOOD news is iMA is using the same fallacious values

iMA(Symbols[k],iTimeFrames[TimeIndex[session]], 2,0,MODE_SMA,PRICE_CLOSE,i);

Be aware than if you are using LWMAs or SMAs with very long periods, you may be losing precision in the values.

No Testing = No Reliability

 
Tzuman:
Guess what double OpenToday=iOpen(Symbols[k],1440,0); returns?

It's not Today's Open but around the open divided by the pairs points. The difference may be the spread

For XAUUSD today, the Open using Open is 1202.07 and iOpen returns 120212.0 for a difference of 5 pips.

The really GOOD news is iMA is using the same fallacious values

iMA(Symbols[k],iTimeFrames[TimeIndex[session]], 2,0,MODE_SMA,PRICE_CLOSE,i);

Be aware than if you are using LWMAs or SMAs with very long periods, you may be losing precision in the values.

I made a grievous error that caused the post above.

I have recently switched brokers and the new one appends a suffix to the Pair name. When I tested this with a couple of different pairs, I forgot about the broker suffix and I was testing with Symbols[k] that did not include the broker suffix. When the suffix was appended to theb pair name, the call processed properly. Unfortunately, the incorrect call was returning values that were close multiples of the correct value.

I apologize for this mistake, I should follow my own comment, No Testing = No Reliability.

MetaTrader should tighten up their function calls and return an error value when the input parameters are erroneous.

 
Tzuman:
I made a grievous error that caused the post above.

I have recently switched brokers and the new one appends a suffix to the Pair name. When I tested this with a couple of different pairs, I forgot about the broker suffix and I was testing with Symbols[k] that did not include the broker suffix. When the suffix was appended to theb pair name, the call processed properly. Unfortunately, the incorrect call was returning values that were close multiples of the correct value.

I apologize for this mistake, I should follow my own comment, No Testing = No Reliability.

MetaTrader should tighten up their function calls and return an error value when the input parameters are erroneous.

How did it return values for the in existing symbol? That means another bug (even more dangerous than the first)

 
apprentice coder:
How did it return values for the in existing symbol? That means another bug (even more dangerous than the first)

You are right. Without some unique value to be returned for a parameter input error, then it is very dangerous as you do not know the failure occurred. I was executing with #property strict so I would have expected it to detect the sub scripting error. This reinforces how important testing and debugging are to insure reliable results.

I cannot understand why my result were so similar but off by _Points. It seems to me there could be a table of different rates for the pairs and my mistake indexed into it incorrectly, but who knows outside of MT.