Registered User Joined: 10/7/2004 Posts: 7
|
Hi Mike,
great meeting you a few weeks ago. While I'm learning the program, would you mind helping me create a condition? I'd like to go off MACDH. From the bottom of a trough (below zero line) in the histogram, when momentum begins to fade, there is a next bar that is not as far down, just a little shorter than the steepest/deepest histogram bar. I often use that as part of many tools to use as an entry point for a trade. Also, the one trough is often not alone.. it might not cross over the zero-line but continue going lower again, before resolving to the upside of the zero-crossing... as often does on the upside as well, which I could use for finding short entries too. But let's start with the long side & I could always work it opposite once I know the configuration for troughs, then crests would be easy for me. please let me know if that was enough to describe what I'm wanting to create. Thanks
Al Russo
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
A RealCode Condition for a trough in the MACD Histogram could be written as:
Writing Conditions in RealCode
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:MACDH Trough
'|******************************************************************
'# MH = indicator.Library.MACD Histogram
'# Cumulative
If MH.Value < 0 AndAlso _
MH.Value > MH.Value(1) AndAlso _
MH.Value(1) < MH.Value(2) Then Pass
A RealCode Condition for the second trough in the MACD Histogram could be written as:
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Second MACDH Trough
'|******************************************************************
'# MH = indicator.Library.MACD Histogram
'# Cumulative
Static Count As Integer
If isFirstBar OrElse _
MH.Value > 0 Then
Count = 0
End If
If MH.Value < 0 AndAlso _
MH.Value > MH.Value(1) AndAlso _
MH.Value(1) < MH.Value(2) Then
Count += 1
If Count = 2 Then
Pass
End If
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|