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

Re: Using Arrays - how and when?


  • To: "Earl Adamy" <dennis@xxxxxxxxxx>
  • Subject: Re: Using Arrays - how and when?
  • From: "Peter Iovanella" <ivo1@xxxxxxxxx>
  • Date: Fri, 8 May 1998 05:08:43 -0700

PureBytes Links

Trading Reference Links

-----Original Message-----
From: Earl Adamy <eadamy@xxxxxxxxxx>
To: omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date: Friday, May 08, 1998 7:52 AM
Subject: Re: Using Arrays - how and when?


>Arrays are useful when you need to store a large or variable length series
of
>pivots. Thus if you will always refer to the last 3 pivots you could use
>variables while if you need to track all pivots occuring during the last n
>periods, you will need to use an array.
>
>Dennis has already noted the correct syntax for SwingH/L. Also, be advised
that
>Omega's SwingHigh and SwingLow functions can and do return invalid swing
points;
>therefore I would not put money on them. Omega has ignored the problem.
There
>are some free and third party ($$) EL solutions floating around. I don't
have
>one to share as mine are in VB.
>
>Earl


I wrote a function that is more exact than the SwingLow function, and which,
when represented in a ShowMe, accurately picks out the pattern I'm looking
for.  The output of the function is the lowest low in the pattern.  Here's
the function:

Condition1 = Low > Low[1];
Condition2 = Low[1] > Low[2];
Condition3 = Low[2] < Low[3];
Condition4 = Low[3] < Low[4];

IF Condition1 and Condition2 and Condition3 and Condition4
THEN ArrowDown=Low[2];

So, forget about the SwingLow syntax stuff - how can I get EL to store each
one of these occurrences - up to, say, the last 10 - and then check back to
see if

1) The last occurrence is at a lower price than the one that preceded it
(ArrowDown < ArrowDown[1])

2) If 1), then, is current price breaks below ArrowDown

3) If 1) AND 2), add X lots to my extant position, but only once, on the
initial break below the last ArrowDown.  I want it to do this _every_ time
there is a new break below a newly formed ArrowDown.

I'm sorry to keep posting all these questions to the list, but Omega EL
support is kinda slow and hasn't been too helpful, either.

Thanks once again,

BJ