Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Platinum Customer
Joined: 12/31/2004 Posts: 16
|
I would appreciate your help in writing the conditions for bullish and bearish island reversals in StockFinder 5.0. I do not see them as choices in the standard libary of conditions. Thank you in advance for your help.
Regards,
rwj
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
One way to create a RealCode Condition for an Island Reversal Top would be:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Island Reversal Top
'|******************************************************************
Static Gap(1) As Single
If isFirstBar Then
Gap(0) = Single.NaN
Gap(1) = Single.NaN
Else If Price.Low > Price.High(1) Then
Gap(0) = Price.High(1)
Gap(1) = Price.Low
Else If Price.High < Gap(1) Then
Pass
Gap(0) = Single.NaN
Gap(1) = Single.NaN
End If
Gap(1) = Math.Min(Gap(1), Price.Low)
If Gap(1) <= Gap(0) Then
Gap(0) = Single.NaN
Gap(1) = Single.NaN
End If
One way to create a RealCode Condiiton for an Island Reversal Bottom would be:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 4.9 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Island Reversal Bottom
'|******************************************************************
Static Gap(1) As Single
If isFirstBar Then
Gap(0) = Single.NaN
Gap(1) = Single.NaN
Else If Price.High < Price.Low(1) Then
Gap(0) = Price.Low(1)
Gap(1) = Price.High
Else If Price.Low > Gap(1) Then
Pass
Gap(0) = Single.NaN
Gap(1) = Single.NaN
End If
Gap(1) = Math.Max(Gap(1), Price.High)
If Gap(1) >= Gap(0) Then
Gap(0) = Single.NaN
Gap(1) = Single.NaN
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Platinum Customer
Joined: 12/31/2004 Posts: 16
|
Thank you Bruce. I will try these.
rwj
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |