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

Re: what's wrong with my ELA?



PureBytes Links

Trading Reference Links

Must be  "avgtruerange"
also-this line needs work- atr=100.0*AverageTrueRange(10)/Close bar ago;
"close bar ago" won't work- try C[1]   for close 1 bar ago etc.
Steve
----- Original Message -----
From: "Brian Keith Voiles" <admagic@xxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Sunday, August 20, 2000 1:04 AM
Subject: what's wrong with my ELA?


> 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
>