Diamondjag![]() Legend ![]() ![]() ![]() ![]() Posts: 404 Joined: 3/12/2006 Location: Brighton, Colorado ![]() | Mel, or anyone else...I think I've got everything working except the stop for an entry price plus or minus ATR(5)*1.67. In other words a stop 5 ATR's times 1.67 below entry on long trades and 5 ATR's times 1.67 above entry for short trades. I've programmed this but it doesn't seem to work...the stops are too far away. Any help would be appreciated. #Stop 'CSG FIB ATR Stop '1.67 time ATR(5) from Entry dim myLevel as single if myLevel = 0 then 'this must be first bar of the trade if myLevel=0 'set the fixed level if Signal = LongSignal then myLevel = EntryPrice-(ATR(5)+(1.67*(ATR(5)*EntryPrice))) elseif Signal = ShortSignal then myLevel = EntryPrice+(ATR(5)+(1.67*(ATR(5)*EntryPrice))) end if end if if Signal = LongSignal then if C end if elseif Signal = ShortSignal then if C>myLevel then Signal = ExitSignal end if end if ExitLevel = myLevel 'so it will plot on chart |