#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Home
Forex Forum
+ Add Script
Metastock
Expert Advisors
Explorations
Indicators
Trading Systems
Metatrader
MQL Experts
MQL Indicators
MQ4 Experts
MQ4 Indicators
MQ4 Scripts
Tradestation
Functions
Indicators
PaintBars
ShowMe
Trading Systems
Amibroker
Commentaries
Explorations
Functions
Indicators
Trading Systems
Contact us
Newsletter
Group: Metatrader MQL Indicators
Title: Linear regression MA
Description:
Linear regression MA
/*[[ Name := linear regression indicator Author := Copyright e 2004, Nick Bilak, beluck[at]ukr.net Link := http://bilak.port5.com Separate Window := No First Color := Red First Draw Type := Line Use Second Data := No ]]*/ Inputs : Rperiod(5); Variables : shift(0), cnt(0), loopbegin(0), first(True), prevbars(0); Variables : sum(0), length(0), i(0), mt(0), WT(0), vWT2(0),value(0); SetLoopCount(0); // initial checkings If RPeriod < 1 Then Exit; length=RPeriod; loopbegin = 206-length-1; For shift = loopbegin Downto 0 Begin sum=0; For i = length downTo 1 Begin sum = sum + (i-(length+1)/3)*Close[length-i+shift]; End; WT=sum*6/(length*(length+1)); SetIndexValue(shift,WT); End;
Author/Source:
Nick Bilak
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact