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

Re: what's wrong with my ELA?



PureBytes Links

Trading Reference Links

<x-flowed>
Okay... I got past the AverageTrueRange word... it should'a been 
"AvgTrueRange".
But now it doesn't like the "exitlong" word.  The program says, "this word not
allowed in study".
Aaarg!
Help.... someone.
I'm going to bed!
Thanks,
Brian Voiles

Here it is:

{vfac - controls the sensitivity of the system and should generally range 
between 1.0 and 3.0
	vmin - minimum volatility (as a % of ATR) to initiate or stay in a trade
	vmax - maximum volatility (as a % of ATR) to initiate or stay in a trade
(end of day system)	}

inputs: vfac(1.5), vmin(0.75), vmax(2.0);
vars: atr(0), blimit(0), slimit(0);
atr=100.0*AvgTrueRange(10)/Close;
if atr<vmin or atr>vmax then begin
exitlong;
exitshort;
end else begin
blimit=(1.0)+0.01*vfac)*Close;
slimit=(1.0)-0.01*vfac)*Close;
buy blimit stop;
sell slimit stop;
end;
</x-flowed>