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

Re: Help with Uptick-Downtick ELA



PureBytes Links

Trading Reference Links

At 3:02 PM -0400 4/13/99, John Clemens wrote:

>I'm not sure what I'm doing wrong with this ELA but when I try to verify it
>the error message comes back as
> "The word THEN must follow an if condition" and the marking cursor if
>placed inside the 1st "(1)".  Can someone help with this.  I want to plot a
>Paintbar when the xaverage of the upticks is greater than the xaverage of
>the upticks of the previous bar, and the xaverage of the downticks is less
>than the xaverage of the downticks of the previous bar. In other words,
>when the xaverages start moving in opposite directions.
>
>

You need square brackets rather than parentheses - see below.

Bob Fulks

----

IF xaverage(upticks,20) > xaverage(upticks,20)[1]  AND 
   xaverage(downticks,20) <  average(downticks,20)[1] THEN BEGIN

    Plot1(High,"High");
    Plot2(Low, "Low");

    IF CheckAlert Then Alert=TRUE:

End;