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

Re: EL Help?_Take III



PureBytes Links

Trading Reference Links

Hi Ian

I'd attack it like this : { similar to what Pierre did - but basically lose 
all the conditional stuff }

Vars: PR(0), C1(0), C2(0);
PR = PercentR(10);

if  PR<PR[1] and PR[1]>=PR[2] then begin {Osc turns down}
C2 = RecentH ;  { save previous high value }
C1 = PR[1] ;  { capture new high value }
end ;

Then check RecentH is different to its previous value then do whatever.

Rgds Stuart



>From: Ian Cunningham <CunCom@xxxxxxxxxxxxxx>
>To: Omega-List <omega-list@xxxxxxxxxx>
>Subject: Re: EL Help?_Take II
>Date: Sat, 23 Oct 1999 12:53:30 -0400
>
>
>
>I may not have been clear in what I am trying to do with this
>EL excercise.
>At C1 I want to return the Oscillator value at its highest point
>after it has turned down. (Condition1). Then, return the value
>for the previous time this has occured (C2)  so that I can compare
>one to the other; eg If C1 < C2 then .....................
>
>Maybe I'm mistaken to use the MRO function for this purpose??
>
>Ian
>
><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >I am hoping someone can help with the following:
> >
> > Using an oscillator such as %R as an example,
> >
> >
> > Vars: PR(0), C1(False), C2(False);
> >
> > PR = PercentR(10);
> >
> > Condition1= PR<PR[1] and PR[1]>=PR[2]; {Osc turns down}
> >
> > C1= MRO(Condition1, 40, 1) <> -1;
> > C2 = MRO(Condition1, 40, 2) <> -1;
> >
> > { I want to capture the values of the (oscillator) highs at the 
>turndowns
>of
> > C1 and C2 for comparison. For C1 I can..............}
> >
> > If C1 then  Value1 = PR[1]: { Is this correct?}
> >
> > {I have brainlock on how to get the value of C2. Any help
> > would be appreciated.}
> >
> > TIA,
> > Ian.
>
>No for C1
>C1 and C2 store the number of bars since the occurence.
>No occurence foud returns  -1 from the MRO function.
>
>So, you need to check
>
>if C1<>-1 then begin
>     value1=H[C1];
>end;
>
>same apply for C2
>
>if C2<>-1 then begin
>     value2=H[C2];
>end;
>
>Howevere,there are smarter solutions by storing the high value when the
>crossover occurs
>
>Condition1= PR<PR[1] and PR[1]>=PR[2]; {Osc turns down}
>if condition1 then begin
>     value2=value1; { previous high #1 become #2}
>     value1=h         {contains last ocurence high #1}
>end;
>
>Et voilą.
>
>Sincerely,
>
>-Pierre Orphelin
>Neurofuzzy Logic tools for TradeStation
>Free evaluation versions and competitive upgrades available
>web: http://www.sirtrade.com
><
>