PureBytes Links
Trading Reference Links
|
Hey Dusant,
It's taken me all night to work through your first offering for the Liner Regression / Standard Deviation Channel indicator - and I think I can now say that I understand how it works. At first, when I saw you add an array to the MLR variable, and then immediately subtracted it again I though I'd lost the plot. But, after hours of research (some of us are just born dumb!) it's all become quite clear. Working with all these arrays certainly takes some getting used-to!
Anyway, I cannot begin to imagine how I might have otherwise worked through this problem by myself, so I'd like to humbly express my sincere thanks for your support.
Also, I played with your second offering - but haven't yet worked it through. It seems to plot 10 line indicators - more like your Gann Fan than a channel indicator. Anyway, can you offer me any additional clues regarding it's working (preferably in pseudo code)?
Cheers,
Don
"Dusant@xxxxxxxxxxxxxxxxxx" <dusant@xxxxxxxxxxxxxxxxxx> wrote:
Take your pick:
1)
Pe:=Input("Periods",3,500,30);Z:=LastValue(LinearReg(P,Pe));Y:=LastValue(Cum(1))-Cum(1);U:=Z-(LastValue(LinRegSlope(P,Pe))*Y);R:=0-(LastValue(Cum(1))-Pe);MLR:= U+Ref(P,R)-Ref(P,R);UMLR:= MLR + Stdev(P,pe);LMLR:= MLR - Stdev(P,pe) ;
mlr;umlr;lmlr;
<FONT face=Verdana
size=2>Pe:=Input("Periods",3,1000,10);(LastValue(LinearReg(C,Pe))-(LastValue(LinRegSlope(C,Pe))*(LastValue(Cum(1))-Cum(1))))+Ref(C,(0-(LastValue(Cum(1))-Pe)))-Ref(C,(0-(LastValue(Cum(1))-Pe)));Ref((LastValue(Ref(LinearReg(C,Pe),-1))-(LastValue(Ref(LinRegSlope(C,Pe),-1))*(LastValue(Ref(Cum(1),-1))-Ref(Cum(1),-1))))+Ref(C,(0-(LastValue(Ref(Cum(1),-1))-Pe+1)))-Ref(C,(0-(LastValue(Ref(Cum(1),-1))-Pe+1))),1);Ref((LastValue(Ref(LinearReg(C,Pe),-2))-(LastValue(Ref(LinRegSlope(C,Pe),-2))*(LastValue(Ref(Cum(1),-2))-Ref(Cum(1),-2))))+Ref(C,(0-(LastValue(Ref(Cum(1),-2))-Pe+2)))-Ref(C,(0-(LastValue(Ref(Cum(1),-2))-Pe+2))),2);Ref((LastValue(Ref(LinearReg(C,Pe),-3))-(LastValue(Ref(LinRegSlope(C,Pe),-3))*(LastValue(Ref(Cum(1),-3))-Ref(Cum(1),-3))))+Ref(C,(0-(LastValue(Ref(Cum(1),-3))-Pe+3)))-Ref(C,(0-(LastValue(Ref(Cum(1),-3))-Pe+3))),3);Ref((LastValue(Ref(LinearReg(C,Pe),-4))-(LastValue(Ref(LinRegSlope(C,Pe),-4))*(LastValue(Ref(Cum(1),-4))-Ref(Cum(1),-4))))+Ref(C,(0-(LastValue
(Ref(Cum(1),-4))-Pe+4)))-Ref(C,(0-(LastValue(Ref(Cum(1),-4))-Pe+4))),4);Ref((LastValue(Ref(LinearReg(C,Pe),-5))-(LastValue(Ref(LinRegSlope(C,Pe),-5))*(LastValue(Ref(Cum(1),-5))-Ref(Cum(1),-5))))+Ref(C,(0-(LastValue(Ref(Cum(1),-5))-Pe+5)))-Ref(C,(0-(LastValue(Ref(Cum(1),-5))-Pe+5))),5);Ref((LastValue(Ref(LinearReg(C,Pe),-6))-(LastValue(Ref(LinRegSlope(C,Pe),-6))*(LastValue(Ref(Cum(1),-6))-Ref(Cum(1),-6))))+Ref(C,(0-(LastValue(Ref(Cum(1),-6))-Pe+6)))-Ref(C,(0-(LastValue(Ref(Cum(1),-6))-Pe+6))),6);Ref((LastValue(Ref(LinearReg(C,Pe),-7))-(LastValue(Ref(LinRegSlope(C,Pe),-7))*(LastValue(Ref(Cum(1),-7))-Ref(Cum(1),-7))))+Ref(C,(0-(LastValue(Ref(Cum(1),-7))-Pe+7)))-Ref(C,(0-(LastValue(Ref(Cum(1),-7))-Pe+7))),7);Ref((LastValue(Ref(LinearReg(C,Pe),-8))-(LastValue(Ref(LinRegSlope(C,Pe),-8))*(LastValue(Ref(Cum(1),-8))-Ref(Cum(1),-8))))+Ref(C,(0-(LastValue(Ref(Cum(1),-8))-Pe+8)))-Ref(C,(0-(LastValue(Ref(Cum(1),-8))-Pe+8))),8);Ref((LastValue(Ref(LinearReg(C,Pe),-9))-(LastValue
(Ref(LinRegSlope(C,Pe),-9))*(LastValue(Ref(Cum(1),-9))-Ref(Cum(1),-9))))+Ref(C,(0-(LastValue(Ref(Cum(1),-9))-Pe+9)))-Ref(C,(0-(LastValue(Ref(Cum(1),-9))-Pe+9))),9)
DusantChief Architecthttp://www.candlestrength.com/
----- Original Message -----
From: Don Cole
To: equismetastock@xxxxxxxxxxxxxxx
Sent: Monday, March 22, 2004 19:17 PM
Subject: [EquisMetaStock Group] Linear Regressions / Standard Deviation Channel
Hey All,
I've been watching this group for a short time now and some of the questions and answers I've seen have been awsome! I've been hoping to catch a clue to a question I have - but it now looks like I'll just have to speak-out and ask.
So, does anyone know where I might find some code that will provide a straight line linear regression with parallel channel lines for a given number of bars and at a distance that I can program (ie number of Standard Deviations from centreline)?
I can easily achieve this functionality by manually using the MS Standard Deviation Channel button, but I want to add the process and its results into an E.O.D. exploration.
Thanks in advance,
Don
Find local movie times and trailers on Yahoo! Movies.
Find local movie times and trailers on Yahoo! Movies.
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/equismetastock/
To unsubscribe from this group, send an email to:equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|