rob-McKinneyTexas![]() Veteran ![]() Posts: 111 Joined: 6/16/2006 Location: San Antonio ![]() | Hi guys, Kris... I see you check to see whether you need the last value of mylevel, or whether it's being replaced. So you save mylevel = mylevel[1] until the other if/then/else checks are done. By the way, guess you know you're not using exitlevel for anything. I always clear out the stop level once the exit is issued in stops like this.... not sure it makes sense but that stop level may persist into the next trade. So the second time a stock trades, mylevel[1] will still be the last stop level instead of zero. I would change the end to look like this: If Signal = LongSignal and C < myLevel Then mylevel = 0 Signal = ExitSignal ElseIf Signal = ShortSignal and C > myLevel Then mylevel = 0 Signal = ExitSignal end if I didn't check it but it might help. Good luck! Rob [Edited by rob-McKinneyTexas on 6/3/2007 8:56 PM] |