Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
The fact that the settings can be changed at all leads you into an area of subjectiveness regarding "what is correct?" I'd stick with the defaults until knowing how the indicator is acting on your chosen securities. The concept is that the channel will encompass the price moves and indicate overbought/oversold periods. Simply, you could take a moving average of the price and create a boundary above and below it based on a percentage of the average. Sometimes it is easier to see if you can follow the code. Below is my interpretation of the stock indicator. Since coding is not my strong point, make sure you check it out closely. It should be the same. Other than that, make sure you look up the Envelope indicator in the User's Manual. It contains a small paragraph about interpretation, and much more about the different input fields.
HTH,
G
[code:1:1335143496]{ g_stockman 'MetaStock Envelope' interpretation }
{ user inputs }
i1:=input("Time Periods",2,252,10);
i2:=input("Vertical Shift %",1,10,1)/100;
i3:=input("Horizontal Shift", -10,10,0);
i4:=Input("Method S=1 E=2 W=3 T=4 Tri=5 Var=6, Vol=7",1,7,1);
i5:=Input("Price O=1 H=2 L=3 C=4 MP=5 TYP=6",1,6,4);
i5:=If(i5=1,O,If(i5=2,H,If(i5=3,L,If(i5=5,MP(),If(i5=6,TYPICAL(),C)))));
{ calculations }
average:=
if(i4=1,Mov(i5,i1,S),
If(i4=2,Mov(i5,i1,E),
If(i4=3,Mov(i5,i1,W),
If(i4=4,Mov(i5,i1,T),
If(i4=5,Mov(i5,i1,TRI),
If(i4=6,Mov(i5,i1,VAR),Mov(i5,i1,VOL)))))));
upper:=ref(average*(1+i2),-i3);
lower:=ref(average*(1-i2),-i3);
{ plot }
upper;lower[/code:1:1335143496]
|