Royal |
Gold User, Member, Platinum User, TeleChart
|
Registered User |
|
|
|
|
Unsure |
|
Thursday, October 7, 2004 |
Friday, February 8, 2019 2:01:06 PM |
127 [0.04% of all post / 0.02 posts per day] |
|
Bruce, the last one that you posted still uses the low from the week of 8/28/15. Can you check the coding? I really appreciate your help with this.
AJ
|
Yes, I want to eliminate the long tail from that day by removing the day/weeks low from the atr calc.
|
Bruce, instead of ignoring the entire week that ended 8/28, can we use the close for that week? I'd like to capture the volatiity of the week and lower close, just not the erratic trading that generated the flash crash II.
|
Bruce, here is a cleaner copy. Again, How can I eliminate the low on 8/24/2015 (weekly date 8/28/2015) from the indicator in this thread? I'd like to keep the "flash crash" (5/7/2015) eliminated as well. Below is the code that I'm working with.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:My Indicator
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
'# ATRperiod = UserInput.Single = 14
'# Cumulative
Static FlashCrash As Date = #5/7/2010 4:00 PM#
Static TR As Single
Static ATR As Single
Static termRatio As Single
static Weight As Single
Static sumWeight As Single
Static NR As Single
Static NRe As Single
Static UT(1) As Single
Static DT(1) As Single
If Price.DateValue = FlashCrash Then
If isFirstBar Then
TR = Price.High(-1) - Price.Low(-1)
termRatio = (ATRperiod - 1) / ATRperiod
ATR = TR
sumWeight = 1
Weight = 1 / sumWeight
NR = 0
NRe = 0
UT(0) = 0
DT(0) = 0
End If
OpenValue = Single.NaN
HighValue = Single.NaN
LowValue = Single.NaN
Plot = Single.NaN
Else
If isFirstBar Then
TR = Price.High - Price.Low
termRatio = (ATRperiod - 1) / ATRperiod
ATR = TR
sumWeight = termRatio + 1
Weight = 1 / sumWeight
NR = 0
NRe = 0
UT(0) = 0
DT(0) = 0
Else
TR = (Price.High - Price.Low + _
Math.Abs(Price.High - Price.Last(1)) + _
Math.Abs(Price.Last(1) - Price.Low)) / 2
ATR = ATR * (1 - Weight) + Weight * TR
sumWeight = sumWeight * termRatio + 1
Weight = 1 / sumWeight
End If
UT(1) = UT(0)
DT(1) = DT(0)
If Price.Last > 30
If Price.High > UT(1) Then
NRe = Price.High - 2 * ATR
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low < DT(1) Then
NR = DT(0) + 2 * ATR
UT(0) = NR + ATR
NRe = Price.Low
DT(0) = Price.Low
End If
Else If Price.Last >= 10 Then
If Price.High > UT(1) Then
NRe = Price.High - 2
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low < DT(1) Then
NR = DT(0) + 2 * ATR
UT(0) = NR + ATR
NRe = Price.Low
DT(0) = Price.Low
End If
Else
If Price.High > UT(1) Then
NRe = Price.High - 2 * ATR
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low < DT(1) Then
NR = DT(0) + 2 * ATR
UT(0) = NR + ATR
NRe = Price.Low
DT(0) = Price.Low
End If
End If
OpenValue = DT(0)
HighValue = UT(0)
LowValue = NR
Plot = NRe
End If
|
Bruce,
How can I eliminate the low on 8/24/2015 (weekly date 8/28/2015) from the indicator in this thread? I'd like to keep the "flash crash" (5/7/2015) eliminated as well. Below is the code that I'm working with.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:My Indicator
'|*** Example: plot = price.close - price.close(1)
'|******************************************************************
'# ATRperiod = UserInput.Single = 14
'# Cumulative
Static FlashCrash As Date = #5/7/2010 4:00 PM#
Static TR As Single
Static ATR As Single
Static termRatio As Single
static Weight As Single
Static sumWeight As Single
Static NR As Single
Static NRe As Single
Static UT(1) As Single
Static DT(1) As Single
If Price.DateValue = FlashCrash Then
If isFirstBar Then
TR = Price.High(-1) - Price.Low(-1)
termRatio = (ATRperiod - 1) / ATRperiod
ATR = TR
sumWeight = 1
Weight = 1 / sumWeight
NR = 0
NRe = 0
UT(0) = 0
DT(0) = 0
End If
OpenValue = Single.NaN
HighValue = Single.NaN
LowValue = Single.NaN
Plot = Single.NaN
Else
If isFirstBar Then
TR = Price.High - Price.Low
termRatio = (ATRperiod - 1) / ATRperiod
ATR = TR
sumWeight = termRatio + 1
Weight = 1 / sumWeight
NR = 0
NRe = 0
UT(0) = 0
DT(0) = 0
Else
TR = (Price.High - Price.Low + _
Math.Abs(Price.High - Price.Last(1)) + _
Math.Abs(Price.Last(1) - Price.Low)) / 2
ATR = ATR * (1 - Weight) + Weight * TR
sumWeight = sumWeight * termRatio + 1
Weight = 1 / sumWeight
End If
UT(1) = UT(0)
DT(1) = DT(0)
If Price.Last > 30
If Price.High > UT(1) Then
NRe = Price.High - 2 * ATR
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low = 10 Then
If Price.High > UT(1) Then
NRe = Price.High - 2
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low UT(1) Then
NRe = Price.High - 2 * ATR
DT(0) = NRe - ATR
NR = Price.High
UT(0) = Price.High
End If
If Price.Low
|
Bruce,
a few years back i stumbled upon a turtle layout that I downloaded in stockfinder but had no idea what it was. I've now read the book by Covel and cant find theTurtle Layout / Indicator in the Stockfinder Forums. Do you know where it is and how I can download it?
Thanks Bruce,
AJ
|
Bruce,
a few years back i stumbled upon a turtle layout that I downloaded in stockfinder but had no idea what it was. I've now read the book by Covel and cant find theTurtle Layout / Indicator in the Stockfinder Forums. Do you know where it is and how I can download it?
Thanks Bruce,
AJ
|
bruce, has this been added yet?
|
Thanks Bruce. Can this be done in some way in tc2000?
|
I would like to create a custom indicator that is the watchlist ranking of the product of two sub rankings.
Ranking #1 = Stochastic Slow Line %D Value
Ranking #2 = Weekly Change of the Fast Line %K
>>>Then (Rank #1) * (Rank #2) = X
>>>Then Rank X
How would this be accomplished?
|
|