Matthew Greenslet![]() Idol ![]() ![]() ![]() ![]() Posts: 2077 Joined: 2/27/2006 ![]() | #Stop #Param "Periods", 2 Dim myLevel As Single myLevel = myLevel[1] If Signal = LongSignal Then If myLevel = 0 Or LLV(Periods) > myLevel Then myLevel = LLV(Periods) End If ElseIf Signal = ShortSignal Then If myLevel = 0 Or HHV(Periods) < myLevel Then myLevel = HHV(Periods) End If End If ExitLevel = myLevel If Signal = LongSignal and C < myLevel Then Signal = ExitSignal Else If Signal = ShortSignal and C > myLevel Then Signal = ExitSignal End If [Edited by Matthew Greenslet on 6/4/2007 10:08 AM] |