PureBytes Links
Trading Reference Links
|
<x-flowed>
I'm putting together this "volatility filter" for my S&P trading.
Can anyone tell me why I keep getting the
"Word not recognized by EasyLanguage" error message on the
word: "AverageTrueRange"?
Here's the code as I see it should be:
{ 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*AverageTrueRange(10)/Close bar ago;
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;
Thanks!
-- Brian Voiles
</x-flowed>
|