Managed to get the syntax right with help from Andreas from tradersplace.net.
However, looking at the simulation results, the CloseAtMarket() method doesn't seem to kick in even though looking at the charts it should have. Am I applying the logic correctly? Here is the code and the bar data.
Private highest55 As New Highest(55)
Private lastclose As New AbsoluteValue
Private lowest10 As New Lowest(10)
Public Overloads Overrides Sub Startup()
' Perform initialization here
Public Overloads Overrides Sub NewBar()
' Put your trading code here
If lastclose.Current >= highest55.Current Then
Public Overloads Overrides Sub OrderFilled(ByVal position As Position, ByVal trade As Trade)
' This method is called when an order is filled
' Check if this is the entry trade for a position
If (position.Trades.Count = 1) AndAlso lastclose.Current <= lowest10.Current Then