Разместил: Дата: 2006-01-11 00:02
Комментарии: (0) Рейтинг:
Re: a Dumb ELA question.
. Subject: Re: a Dumb ELA question.
. From: "Earl Adamy"
. Date: Tue, 31 Mar 1998 19:01:07 -0700
. Resent-Date: Tue, 31 Mar 1998 18:04:23 -0800 (PST)
. Resent-From: omega-list@xxxxxxxxxx
. Resent-Message-ID: <"XPsfd3.0.4-6.s1Q8r";@mx2>
. Resent-Sender: omega-list-request@xxxxxxxxxx
If I understand your question you can either set MaxBarsBack in your indicator or you can wrap the whole thing in conditional which will insure that execution does not take place until you have the required lookback.
"if BarNumber > Length then BEGIN
Date: Monday, March 30, 1998 11:20 AM
Subject: a Dumb ELA question.
Thanks for the help over the last month guys,
I am trying to write an ela code that will compare an variable no. of the most recent bars and compare them to all that i have loaded...
I thought that somthing like:
Type : Indicator, Name : MATCH
FOR EE = 1 TO LENGTH BEGIN;
DC = (close - open)/open*RR;
DC1 = (close[FF]-open[FF])/open[FF]*RR;
DH = (high - open)/open*RR;
DL = (low-open)/open*RR;
DL1 = (low[FF]-open[FF])/open[FF]*RR;
A1= (DC-DC1) ;
A2= (DH-DH1) ;
A3= (DL-DL1) ;
IF ABSVALUE(A1)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A2)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A3)>= PERCENT THEN YY=YY+1;
would give me what i wanted, alas no....
I am guessing that i need to alter the MaxBarsBack, but how do i do this through ELA?.. the manual doesn't seem to give an example...