Elite indicators :) - page 133

 

Hi mladen & gang,

I have an indicator I wish to use in an EA.

When looking at values in data window, it seems the indicator does not always calculate the values for all variables. See attached screenshots to better explain what I am trying to say here:

- On magenta dot, indicator shows no value for bbMacd.

- On lime dot, indicator shows no value for Upperband.

Can you have a look and see if this indicator can be made suitable for EA use in current condition.

My objective: I wish to use the "dots" and calculate distance from upper/lower band, if distance is greater than x, give signal, etc.

Many thanks in advance!

Files:
snag-0006.png  60 kb
snag-0007.png  61 kb
bb_macd.mq4  5 kb
 

Snowski,

Try this one out first (this one 100% sure calculates and draws all the values:)) It is not a corrected one but a different one

If you want to use it from EA, make sure to set the DrawDots parameter to true (to avoid one extra point and one extra buffer comparison if you want a "trend" comparison too) Also, this one always has a value in the 3rd buffer (macd values) So, for the purpose you want it, it is enough to compare values from the 3rd buffer to the values in the 1st and/or 2nd buffer regardless of DrawDots settings

Files:
bb_macd.gif  20 kb
bb_macd_1.mq4  6 kb
 

Thanks mladen, code looks a lot simpler...

But I won't be able to use it in an EA....unfortunately. The channels and dots keep moving slightly with every tick...even up to 20 bars back.

Is there a way to have the dots and lines "fixed" once drawn? So no 'repainting'..?

Cheers, San.

 

San,

It is not repainting. It is, in the end, a simple case of Bollinger bands applied to MACD signal line. Nothing unusual nor anything too demanding that would cause some coding error. Not even the colored line repaints.

The moving of the channels (visual) happens when the new highs or the new lows are made and then metatrader repositions every previous value to draw it. As far as the values are concerned, it can not repaint since it is working on same input values and thus the values are the same, Please, re-download the indicator and check it again

_________________________

PS: in the one you posted the error when calculation deviations comes from this line :

sDev = iStdDevOnArray(bbMacd, 0, Length, MODE_EMA, 0, i); [/php]From the help it is clear that the MODE_EMA is in the wrong place :

[php]double iStdDevOnArray(double array[],int total, int ma_period, int ma_shift, int ma_method, int shift)

So the MODE_EMA is placed where the parameter for ma_shift should be

regards

mladen

 

Agree, mladen, "repaint" is not the correct phrasing for this situation. Hence the single 'quotes'.

The main concern I had: Does the distance from "dot: to "bb line" remain the same on past bars. Will check myself as well, but you perhaps know the answer straight away...

If this does not change, then it could be used in EA.

Cheers, and thanks again,

San.

 

San,

Don't worry : it does not change. The distance (difference between bands and MACD line) of the first closed bar and the older bars does not change. I guarantee it in this case

regards

mladen

 

Thanks, that makes sense given the explanation you gave in earlier post.

Great error finding by the way!

Cheers, San.

 

Jumping Uni-Cross indicator

Hello Mladen,

some time ago, you have fixed the uni cross indicator. There is only one problem: The signals jump from one bar to the next. So I can`t located, where is the signal. It is possible for you, to take a second look at this indicator and try to find a solution.

Thanks for your effort

Patona

 

...

pipmagnet.

I think that this should solve your problem, but I am not sure. As far as I see, the indicator will not work if symbol names contain any "addition" (EURUSD is EURUSDm for example, or anything similar they are using these days)

Added one parameter : "addition" - just enter any additional characters your broker is using in symbol names, and it should work
1000pips_medium_1.mq4
__________________________________________________

patona,

Sorry, but the "jumping" is a result of TMA centered nature. I wrote a warning in the source about it (this one :

//+------------------------------------------------------------------+

//| |

//| disclaimer : centered triangular moving average |

//| recalculates last half cycle bars, and thus those |

//| bars are subject of changing |

//| |

//+------------------------------------------------------------------+

Unfortunately there is no cure for that.

regards

mladen

Files:
 

SchaffTrendLine levels 25/75

Hi Mladen,

On Page 131 and Post #1308, I asked if you could please change the newly made "Arrows" version so that it alerts when the price breaks the 25/75 levels in stead of the colour change as it does at present. I know you are extremely in demand all over TSD, but would you mind considering my request, please? If you feel that you don't have the time, please just let me know.

Also, the "Schaff Trend Cycle mtf" - would you mind making an Arrows version of this one as well with the only Arrow showing when the STC mtf falls through the 25/75 levels? If not possible due to the MTF nature of the indicator, could you make it to change colours as the original one in which case we have an alert at least.

Looking forward to hearing from you and thank you in advance.

Reason: