Created
January 5, 2015 07:45
-
-
Save masayang/935c933633e330427207 to your computer and use it in GitHub Desktop.
TD D-Wave for StockFinder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'|****************************************************************** | |
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com | |
'|*** Copy and paste this header and code into StockFinder ********* | |
'|*** Indicator:TD D-Wave | |
'|*** Example: plot = price.close - price.close(1) | |
'|****************************************************************** | |
Static Wave As Integer | |
Static MinA As Single | |
Dim WLabel As String | |
If isFirstBar Then | |
Wave = -1 | |
MinA = Single.MaxValue | |
WLabel = "" | |
End If | |
If (Wave = -1 or Wave=8) And Price.Low < Price.MinLow(20, 1) Then | |
Wave = 0 | |
End If | |
If Wave = 0 And Price.High > Price.MaxHigh(13, 1) Then | |
Wave = 1 | |
WLabel = "1" | |
End If | |
If Wave = 1 And Price.Low < Price.MinLow(7, 1) Then | |
Wave = 2 | |
WLabel = "2" | |
End If | |
If Wave = 2 And Price.High > Price.MaxHigh(20, 1) Then | |
Wave = 3 | |
WLabel = "3" | |
End If | |
If Wave = 3 And Price.Low < Price.MinLow(12, 1) Then | |
Wave = 4 | |
WLabel = "4" | |
End If | |
If Wave = 4 And Price.High > Price.MaxHigh(33, 1) Then | |
Wave = 5 | |
WLabel = "5" | |
End If | |
If Wave = 5 And Price.Low < Price.MinLow(12, 1) Then | |
Wave = 6 | |
WLabel = "A" | |
End If | |
If Wave = 6 Then | |
If MinA > Price.Low Then | |
MinA = Price.Low | |
End If | |
End If | |
If Wave = 6 And Price.High > Price.MaxHigh(7, 1) Then | |
Wave = 7 | |
WLabel = "B" | |
End If | |
If Wave = 7 And Price.Low < Price.MinLow(20, 1)Then | |
Wave = 8 | |
WLabel = "C" | |
End If | |
If Wave = 8 And Price.Close < MinA Then | |
Wave = -1 | |
WLabel = "" | |
MinA = Single.MaxValue | |
End If | |
Plot = Wave | |
Label=WLabel | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment