Shading Moving Average Levels

 
Hi,

I have a custom moving averages indicator but it doesnt have the 'levels' option which i use. What i need is one with levels or the code for that option, also the ability to shade the area between the two levels so that it forms a shaded band across my charts.

Please help me with this if you can.

Many thanks,
Napeharm
 
Regarding shading have a look at the Ichimoku indicator that comes with the MT samples. It does shaded bands.

I'm not entirely sure how it works, but from looking at it, it seems that you place a histogram indicator buffer between to line buffers.

I'm also not sure sure what you mean by levels, but you may want to create HLINE objects to draw vertical lines or just use a line buffer with the indicator and fill that line buffer with the same values which will give you a horizontal line.


Markus
 

Regarding shading have a look at the Ichimoku indicator that comes with the MT samples. It does shaded bands.

I'm not entirely sure how it works, but from looking at it, it seems that you place a histogram indicator buffer between to line buffers.

I'm also not sure sure what you mean by levels, but you may want to create HLINE objects to draw vertical lines or just use a line buffer with the indicator and fill that line buffer with the same values which will give you a horizontal line.


Markus


Hi, Markus,

Thanks for your reply. By 'levels' i mean the mov avs options tab which creates levels either side of a moving average. I have mione set at +10 and -10. I have looked at the ichimoku code as well. I have made the Bollinger i wanted which i asked you about before, with shift and histogram shading on it. Being able to shade between these levels will complete the 'cloud area' on my chart.

I will check out your suggestions.

Regards,
Napeharm
 
Well, regarding the levels I don't know if these are available for custom indicators. But just add an input to your indicator (like LevelDistance) and just use two more buffers with lines for these. Shouldn't be too hard to compute the value of your MA plus/minus LevelDistance ;-)

Good luck


Markus
 

Well, regarding the levels I don't know if these are available for custom indicators. But just add an input to your indicator (like LevelDistance) and just use two more buffers with lines for these. Shouldn't be too hard to compute the value of your MA plus/minus LevelDistance ;-)

Good luck


Markus


Hi,

You may well be right that the levels are not available for custom indicators. I certainly havent found them and they are not on the custom mov av indicator. In case you were wondering why i am pursuing this enquiry it is simply to remove lines from the chart window and use solid areas of colour instead. Doing this with the Bollinger has removed three lines already freeing up the chart window for other indicators with lines etc without having to untangle the meaning of them. It is simple and effective.

Thanks for your suggestions.

Regards,

Napeharm
Reason: