[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL code problem



PureBytes Links

Trading Reference Links

On Sat, 24 Aug 2002, KungFuTrader wrote:

> Hi List,
> 
>              I was hoping someone might be able to lend me a hand. I am
> trying to do some back testing but keep on running into the problem where I
> have multiple entries. What I would like to do is if I'm in a long trade,
> then inhibit any short entry signals until my long exit signal, and vice
> versa for a short. Any ideas would be appreciated.
> 
> -KungFuTrader.
> 

vars: intrade(false), inlong(false);

if CONDITIONS-ARE-RIGHT-FOR-LONG and intrade = false then begin
	intrade = true;
	inlong = true;
end;

if CONDITIONS-ARE-RIGHT-FOR-SHORT and intrade = false then begin
	intrade = true;
	inlong = false;
end;