Sorry but I can not replie the error you're referring to.
Thank you both for your replies -
Kilian - it only occurs when on new bars being processed. If you load the indior, or reload it, it is going to appear ideal. But when using in actual time, at the turning points in which before we'd holes, it is going to print both buffers.
I believe that should be difficulty #6 I talked a page ago .Originally Posted by ;
Originally Posted by ;
I will have a look at it though and see if it really caused by that dilemma
Any Fortune Kilian?
EDIT: placing it to compute just when the pub has closed appears to address the issue. But, I simply don't know why it doesn't work when it is calculating/updating on the current bar. It needs to be simple enough -
if Xcurrentgt;=Xprevious - do this
else do this
There are three choices , up down or equal, and all three are coated by employing gt;= and lt;
Correct?
This seems to have solved the issue - taken from another color changing moving average indior -
https://www.forexsoutheast.asia/atta...5940375767.mq4
Yes there are just three possible cases but they can occure during precisely the exact same bar.Originally Posted by ;
Tma is below 0
Upbuffer = 1
Downbuffer = 0
If the Tma is higher 0 the buffers seem like this
Upbuffer = 1
Downbuffer = 1
The Ideal way would be not to just to assign a value to the current buffer but to erase the value of the old buffer too
if(TmaUp)
Up = 1
Down = EMPTY_VALUE
else
Up = EMPTY_VALUE
Down = 1
Kilian - that doesn't work. It creates holes in the plot in the turning points.
Yes at the turning point but that shouldn't be the problem I thought the problem is that the bar after the turning point at the turning point both values have to be plotted, thats why we put that code in in the first loion! At least that's what I imagined. I haven't had time to check out the indior today.Originally Posted by ;
In my view mql4 is a badly written speech. Anyways that's a bug that occurs but isn't that crucial as you won't be altering the code all the time .
One thing you might want to try is adding the color property for the Buffers from the SetIndexStyle call.
The dilemma is that both buffers become plotted during a bar where the indior is spinning - which is what happens through the solution we originally put in, it prints both buffers rather than directly on top of each other so it's possible to see both buffers (hard to explain, the pic above shows what I believe ). The solution that I posted above seems to work as intended... Thanks for the continuing help -Originally Posted by ;