Jim Dean![]() Sage ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | Here ya go: myLevel = EntryPrice-1.67*ATR(5) elseif Signal = ShortSignal then myLevel = EntryPrice+1.67*ATR(5) Also correct/simplify the final if then to: If Signal = LongSignal and C < myLevel then Signal = ExitSignal elseif Signal = ShortSignal and C > myLevel then Signal = ExitSignal end if PS: although is legal not to in OL, when you post code on the forum the > < disappear unless you put spaces around them. [Edited by Jim Dean on 6/13/2018 6:46 AM] |