Diamondjag![]() Legend ![]() ![]() ![]() ![]() Posts: 404 Joined: 3/12/2006 Location: Brighton, Colorado ![]() | My local investing club put together their “ideal” system and I agreed to program it and run it in OmniTrader to see how it does. They have so many filters in it that it hardly ever trades. Clearly it will be a terrible system but I want to run it for them. I’ve programmed all except the stops. They have three stops and a profit target. I’m not really a programmer and a couple of stops I’m especially having trouble with. I would think all should be fairly easy for a real programmer: They want a stop ATR(5) X 1.65 below the entry. I’ve programmed: Stop 1: If Signal = LongSignal And Entryprice-(ATR(5)*1.67) < Entryprice then Signal = ExitSignal ElseIf Signal = ShortSignal And Entryprice+(ATR(5)*1.67) > Entryprice then Signal = ExitSignal End If Doesn’t seem to work. I have no stops in my Omni language files that I can use as an example that deal with stops from the entry price. Any help would be appreciated. Stop 2: 2% below the Lowest Low of the past 5 days. I’ve programmed: If Signal = LongSignal And C < (LLV(5)-(LLV(5)*.02))[1] then Signal = ExitSignal ElseIf Signal = ShortSignal And C > (HHV(5)+(HHV(5)*.02))[1] then Signal = ExitSignal End If Stop 3: And the final stop is a close that crosses a Parabolic SAR. I’ve programmed: If Signal = LongSignal And C[1] > SAR(0.02,0.2) and C < SAR(0.02,0.2) then Signal = ExitSignal ElseIf Signal = ShortSignal And C[1] < SAR(0.02,0.2) and C > SAR(0.02,0.2) then Signal = ExitSignal End If PProfit Target: Finally, they have a profit target that I haven’t even tackled…. Profit Target - 2 times (the entry price minus the initial stop loss price). Any help on these would be greatly appreciated. Thanks [Edited by Diamondjag on 6/7/2018 10:50 PM] |