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

[amibroker] Re: Mathematical question. thank you



PureBytes Links

Trading Reference Links

Thanx very much Daniel. I will look at the code...
Regards / Patrik
--- In amibroker@xxxxxxxxxxxxxxx, Daniel Ervi <daniel@xxxx> wrote:
> > i d/l from the library, and installed it.  i have not used this
> > before, but i have seen it in postings on the Inspire_Software
> > group.  I used KO as an example and it showed the pattern
> > terminating on 3/27/04.  i kept deleting the days until it 
reached
> > 3/26, and the lines disappeared.  also, fwiw, ACLS has 6 
different
> > ending points pattern in Feb 04.  i'm not being picky here--
please
> > don't misunderstand--you mentioned it was a work in progress.
> 
> Actually, this is a limitation of the algorithm that is being 
used.  I simply ported this from the Wealth-Lab code posted by 
another person, which is a pretty limited implementation.  The last 
leg of the pattern (C to D) is calculated in real time by 
subtracting the low at D (or high for a short), from C.  This means 
if you have five lows in a row that all fit the criteria, you'll end 
up with five pattern hits.  Okay for an EOD trader, but useless for 
an intraday trader.
> 
> > I know i need to go read about this indicator, and you provided a
> > site in your first post, but how would you use this, because the
> > pattern is drawn after the fact.  You would never know a 
butterfly
> > was forming, until after it formed, in the case of KO, it kept
> > climbing to 51.24... i guess being a day late is no big deal--it
> > would just be nice to see the potential for the termination of 
the
> > pattern---before it happens....
> 
> The standard way of trading these is to set your stop at or just 
below (above for short) X.  Then set a profit target at 0.618 of the 
CD leg.  So if C to D is 10 points, you would add 6.18 to your entry 
price as a profit target.  Steve Carney at 
http://www.harmonictrader.com goes over this in great detail in his 
book, especially his second one which just went to print.  It is 
$50.00 well spent if these types of patterns intrigue you.
> 
> > Attached is a .jpg from an Inspire plot.  i shows the projected
> > pattern out a few days.  I know AB won't draw lines that far past
> > the last day, but even 5 or 6 days would be a help.  i have no 
idea
> > how to do that though.  at any rate--thanks for sharing.
> 
> In a nutshell, I understand all your points above.  When I 
discovered the original Wealth-Lab code back in mid-November, I 
found all the same errors and gotcha's.  I was also disappointed at 
the speed penalty that the multiple calls to Peak and Trough 
caused.  So I have spent the last 4 1/2 months programming a pattern 
scanning engine as DLL add-in to Wealth-Lab.  I don't want to get 
into it here, but basically it allows you to create an XML 
definition for a pattern by defining time and price rules, which it 
will then load and search for.  It will find these patterns, draw 
them, project them out in real time, enter all positions, and then 
monitor stops and profit targets, all in less than 32 ms per stock 
(10,000 bars).  It has been written in Delphi, and abstracted as a 
set of classes so that I can move it to another platform in the 
future.  Once AmiBroker has auto-trading implemented, I will start 
the process of porting it over, but until then I will continue 
developing on my current platform as I auto-trade these on intraday 
data.
> 
> The code I posted here probably won't be developed further by 
me.  It was meant as an inspiration for others to try forgetting 
about what value of stochastic is best, or what EMA will prove most 
profitable.  Nothing is more pure than price, and it if you 
understand these patterns, they can become a great leading tool that 
stands on its own.  People tend to spend too much time with 
indicators.  How many ways can you slice and dice price data before 
it all becomes the same?
> 
> Anyone can take this code, find it's limitations, and then work to 
overcome them.  In doing so it will become their own code, and they 
will understand it better than anyone else.  For those that don't 
program, neither did I at one point.  :)  But by embracing a problem 
you learn to overcome your limitations.  Many an AFL guru will agree 
here...
>  
> One last point as well.  In the case of the Gartley 222 and the 
Butterfly, the AB=CD portion of the pattern is usually consider 
symmetrical.  This means in both price AND time.  The code I posted 
does not measure the time component, and as such there are pattern 
hits where there shouldn't be.  Maybe an AFL guru will help fix that 
issue.  And an EOD trader can use the best pattern scanner out there 
(between you ears!) to filter them out.
> 
> Now I'm off to continue working on my other projects...  Thanks 
for the feedback!
> 
> Daniel



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/