|
Marcus Schöppl
2014-10-28 14:22:26
|
|
hello i have an indicator in easy language, it calculates the "System Quality Number" of an Stock, Index oder Commodity.
Values above 2.5 are perfect for Trading! This Indicator first calculates the TrendLength, which depends on the SuperTrend Indicator.
The Trendlenght is then the Period f�r calculating the SQN. So its a very nice self adjusting Indicator.
If you would screen for stable and steady performing stocks, search for stocks who have an SQN Value above 2.5
here it the indicator code:
// define trendlength
a = Supertrend[3,20]
If Close Crosses Under a Then
dwTr = -1
Else
dwTr = 0
Endif
x = dwTr
f = x > -1
i = 0
WHILE f[i] DO
i = i + 1
WEND
// calculate lowest point
If Barindex > i+10 Then
xx = Lowest[Max(1,i)](Low)
If Low = xx Then
trend = 1
Else
trend = 0
Endif
Endif
// calculate sqn period
If Barindex > 100 Then
x1 = Trend
f1 = x1 = 0
i1 = 0
WHILE f1[i1] DO
i1 = i1 + 1
WEND
Endif
trendlength = Max(1,i1)
// calculate sqn with trendlength
ProfitSer = ROC[1](Close)
ProfitSMA = Average[trendlength](ProfitSer)
sqn = sqrt(trendlength) * ProfitSMA / STD[trendlength](ProfitSer)
// adjustment
If Close < a Then
sqn = 0
Else
sqn = sqn
endif
return sqn
|
|