steve&sue
24th June 2006, 11:10 AM
Hi Jose!
I am trying to code up a long system which uses an initial stop of Entry Price - Ref(1.0*ATR(20),-1) and a trailing stop based on intraday price < Ref(LLV(L,5),-1).
The problem I have is that sometimes the trailing stop is higher than the initial stop on the day of entry and I get kicked out of the trade prematurely (or even before I enter the trade if the open is less than the trailing stop!)
Is there any way of activating the trailing stop if and only if it has exceeded the entry price of the trade (and making it invisible if it is above the open price on the entry day - assuming I want to enter on the next market open after the trigger day)?
Any guidance is greatly welcomed!
Steve
I am trying to code up a long system which uses an initial stop of Entry Price - Ref(1.0*ATR(20),-1) and a trailing stop based on intraday price < Ref(LLV(L,5),-1).
The problem I have is that sometimes the trailing stop is higher than the initial stop on the day of entry and I get kicked out of the trade prematurely (or even before I enter the trade if the open is less than the trailing stop!)
Is there any way of activating the trailing stop if and only if it has exceeded the entry price of the trade (and making it invisible if it is above the open price on the entry day - assuming I want to enter on the next market open after the trigger day)?
Any guidance is greatly welcomed!
Steve