Moving Average Envelopes (Channels)

pirx

Active member
Messages
111
Likes
0
Hello,

I was trying to find the Metastock formula for MA Channels, but without success. Since I´m a Metastock newbie and not much of a programmer, I would appreciate, if someone could help me to convert the original MA Channels formula into MS format. The formula looks like this:

MA Channels:
Upper Channel Line = EMA + Channel Coefficient x EMA
Lower Channel Line = EMA - Channel Coefficient x EMA

I hope it´s not too much trouble :D Thank you!

Henrik
 
Substitute E in place of S Vol W you'll find in the code.

Polish language in the code shouldn't make any difference, copy/paste code into the Indicator Builder and try it, it may relate to User Inputs for the indicator which should be simple enough to figure out by placing it on the price/in a window.
 
Thanks, Trdr. I´ve modified my reply before you replied to me, so the polish language isn´t visible anymore, sorry.

This is the code posted before:

Envelope - Koperta
Dsre:= Input("Długość średniej - .",10,100,45);
Dpro:= Input("% średniej - .",0.1,100,15);

;Mov(C,Dsre,S) + ( (Dpro{%}/100) * Mov(C,Dsre,S))
;Mov(C,Dsre,S)
;Mov(C,Dsre,S) - ( (Dpro{%}/100) * Mov(C,Dsre,S))

Just in case, if anyone would wonder :) So, all I do is replace S for E and I have EMA´s? Thats neat :) I really need to read the Formula Primer from Metastock...
 
Only now did I realize that the Envelopes are already built in into the Metastock! :rolleyes: :cheesy:

I was unable to see them, because I have unchecked this indicator, not realizing, that Envelopes and Channels mean, more or less, the same thing! What a newbie ;)

But thanks again for helping me out with those pages!
 
Top