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

Re: Need help with system



PureBytes Links

Trading Reference Links

BJ:
First I'd recommend plotting the functions with paintbars and making sure
the functions are working properly. Pattern recognition is fairly dificult
with TS. With that eliminated you'll have to go to work debugging the
system.

Good luck,
Randy
----------
From: Peter Iovanella <ivo1@xxxxxxxxx>
To: omega-list@xxxxxxxxxx
Subject: Need help with system
Date: Thursday, April 30, 1998 11:21 AM

Hi -
I'm brand-spanking-new to using EasyLanguage, and I've run into some
trouble.  I've attached the code that I've assembled so far, so let me
explain what I'm trying to do with it.

I'm attempting to develop a system that will buy/sell after price breaks
above a formation that I call an 'arrow.'  It is something like a
SwingHigh/Low with Strength=2, except more strict.  This is difficult to
explain, but whereas it is possible for a swing high to look like this (I
hope these line up correctly):

                  |
|                 |                |
|        |        |        |        |
         |                 |

(the middle bar being the SwingHighBar),  an Arrow must look like this:

                  |
                  |
         |        |        |
|        |                 |        |
|                                  |

If those things don't line up correctly, just apply the PaintBars I've
included in the attached file to any chart and you'll see what I mean.
Anyway, once the system finds these patterns, I want it to buy or sell on a
subsequent break above/below the Arrow High or Low.  To keep from entering
against the trend, however, I've included a filter that will only allow
entry if a set of moving averages are in a particular order - again, see
the
attached code.  Finally, I've set the system up to buy/sell 5 lots for
initial position, and 10 lots on subsequent breaks above/below another
ArrowHigh/Low in the same direction.  Additionally, the system will reverse
and establish a 5 lot position in the opposite direction in the event that
an opposite Arrow forms.  Finally, I've added a moving average filter stop
as well, so if price closes below the 18-day exponential avg, my position
will be liquidated.  But the results I get when I test this thing are so
far
off it's just silly.  It trades way too often and in the wrong direction,
and doesn't trade sometimes when it ought to do so.

I suspect my first problem is in getting my system to find these Arrow
patterns.  I tried two different ways of doing this.  The first is a
modified version of the PaintBar I wrote so that it could be manipulated as
a function; these are the 'ArrowUp' and 'ArrowDown' functions attached, and
they are called by 'BJs Arrow Breakout 1.'  The second is a modified
version
of the SwingHigh and SwingLow functions provided by Omega, to which you
will
see I added the line "or Price[X] < (Price[X])[1]," of course changing the
>
and < where appropriate, to the sections that read

begin
   if Price1 < Price[X] then
   Truth = FALSE;
   X = X + 1;
end;

so that they instead read

begin
   if Price1 < Price[X]
   or Price[X] < (Price[X])[1] then
   Truth = FALSE;
   X = X + 1;
end;

These modified Swing functions are named 'ArrowHigh' and 'ArrowLow,' and
are
called by 'BJs Arrow Breakout 2.'  I'm not quite sure if it is either of
these functions that is causing the problem, but to me they seem to be the
most likely culprits.  I'm sure everything else in my code is messed up,
too, but please see if you can help me out.  If you have any questions
about
what I'm trying to do, don't hesitate to ask.  Thanks a lot.

BJ