From the October 01, 2011 issue of Futures Magazine • Subscribe!

Gold code

Sub Simple_IntermarketTool(Relate, IntMark, Len1, Len2)

If Relate=0 Then
If Close>Average(Close, Len1, 0)And Close Of Independent(IntMark)>Average(Close Of Independent(IntMark), Len2, 0) Then
Sell("", 1, 0, Market, Day)
End If

If Close
Buy("", 1, 0, Market, Day)
End If
End If

If Relate=1 Then
If CloseAverage(Close Of Independent(IntMark), Len2, 0) Then
Buy("", 1, 0, Market, Day)
End If

If Close>Average(Close, Len1, 0)And Close Of Independent(IntMark)
Sell("", 1, 0, Market, Day)
End If
End If

End Sub

About the Author
Murray A. Ruggiero Jr.

Murray A. Ruggiero Jr. is the author of "Cybernetic Trading Strategies" (Wiley). E-mail him at ruggieroassoc@aol.com.

Comments
comments powered by Disqus