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

Re: [amibroker] Re: visualising rectangles


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: Re: [amibroker] Re: visualising rectangles
  • From: suree namsiripongpan <suree_n@xxxxxxxxx>
  • Date: Mon, 15 Nov 2004 06:25:30 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

PureBytes Links

Trading Reference Links

Thank you very much for your book reference  and rules
offered.  I will try to code by myself.  Looking
forward to seeing your mail.

Best Rgds, 

Suree


--- ed nl <ed2000nl@xxxxxxx> wrote:

> hi Suree,
> 
> yes the default setting are the settings given by
> Conway and and Behle (Length = 4). If you use
> different setting naturally you will get different
> signals as well.
> 
> I bought it using Amazon.com to get their book.
> 
>
http://www.amazon.com/exec/obidos/tg/detail/-/0971853649/002-9860528-9631218?v=glance
> 
> later Ican send you their entry + exit rules to your
> private address but you will have to program it
> yourself,
> 
> rgds, E
> 
>   ----- Original Message ----- 
>   From: suree namsiripongpan 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Monday, November 15, 2004 2:27 PM
>   Subject: Re: [amibroker] Re: visualising
> rectangles
> 
> 
>   Dear Ed, 
> 
>   Thanks again for your kindness.  I ran your new
> code
>   and now better understand the code logic.  But my
>   question is what is the appropriate length and
> range
>   factor ? If i use your default setting, i will get
> the
>   different rectangle, i.e. the past one.  But if i
> use
>   8 and 1.5 then i will get the current one.  And
>   luckily, today close, has exceeded  the long
> breakout.
>   :)  That's mean tomorrow, the trend should
> continue ?!
>   at least to the next fibonacci level from the
> previous
>   trought, i guess.
> 
>   how can i get the soft copy of 'professional stock
>   trading' so i can understand the concept behind
>   clearly, i am afraid i could not find it in my
>   country....
> 
> 
>   many thanks one more time :)
> 
>   --- ed nl <ed2000nl@xxxxxxx> wrote:
> 
>   > hi Suree,
>   > 
>   > you could indeed use it in a explore. You need
> to
>   > add:
>   > 
>   > Filter = yon == 1;
>   > Addcolum(yon,"Rectangle detected");
>   > 
>   > Then the next day (or bar) you either go long or
>   > short if it breaks the long breakout level or
> the
>   > short breakout level.
>   > 
>   > If I scan the Nasdaq 100 stocks for today it
> finds 3
>   > possible entries. HSIC, JDSU, PAYX. Depending on
>   > whether the price breaks the breakout levels
> they
>   > can be entered as a long or short position. But
> I
>   > did not test how good it works in a system. You
> need
>   > to have a plan ready where to get out.
>   > 
>   > Below I added code that includes Explore
> functions.
>   > Also I put the rectangles inside the chart. Note
>   > that multiple adjacent rectangles destort the
> box
>   > like shape.
>   > 
>   > rgds, Ed 
>   > 
>   > 
>   > /*
>   > 
>   > Rectangle System Development
>   > 
>   > after: "Professional Stock Trading", M. Conway /
> A.
>   > Behle, 2003, pages 106, 107, 108
>   > 
>   > Edward Pottasch, nov 2004
>   > 
>   > */
>   > 
>   > RectangleLength = 4;
>   > RangeLength = RectangleLength * 3;
>   > RangeFactor = 1.0;
>   > RangeRatioLimit = 0.3;
>   > AtrPeriod = RangeLength;
>   > 
>   > // rectangle
>   > hg = HHV(H,RectangleLength);
>   > lw = LLV(L,RectangleLength);
>   > HeightRectangle = hg - lw;
>   > 
>   > // preceding range
>   > hgp = Ref(HHV(H,RangeLength),RectangleLength *
> -1);
>   > lwp = Ref(LLV(L,RangeLength),RectangleLength *
> -1);
>   > HeightRangeLength = hgp - lwp;
>   > 
>   > // aspect ratio
>   > ar = HeightRectangle / HeightRangeLength;
>   > 
>   > // ATR
>   > at = ATR(AtrPeriod);
>   > 
>   > // decide if it is a rectangle
>   > yon = IIf(ar < RangeRatioLimit AND
> HeightRectangle <
>   > at * RangeFactor, 1, 0);
>   > 
>   > // breakout level
>   > long_breakout_level = IIf(yon,yon * hg,Null);
>   > short_breakout_level = IIf(yon,yon * lw,Null);
>   > 
>   > // decide about direction
>   > Buy = IIf(H > Ref(long_breakout_level,-1),1,0);
>   > BuyPrice = IIf(O > Ref(long_breakout_level,-1),
> O,
>   > Ref(long_breakout_level,-1));
>   > Short = IIf(L <
> Ref(short_breakout_level,-1),1,0);
>   > ShortPrice = IIf(O <
> Ref(short_breakout_level,-1),
>   > O, Ref(short_breakout_level,-1));
>   > 
>   > Plot(C,"",colorWhite,64);
>   > 
>   > PlotShapes(IIf(yon,shapeCircle,0),colorWhite,
> layer
>   > = 0, yposition = O, offset = 0 );
>   > PlotShapes(IIf(Buy,shapeUpArrow,0),colorWhite,
> layer
>   > = 0, yposition = BuyPrice, offset = 0 );
>   >
>  
>
PlotShapes(IIf(Short,shapeHollowDownArrow,0),colorLightBlue,
>   > layer = 0, yposition = ShortPrice, offset = 0 );
>   > 
>   > // visualize the rectangles
>   > rect_top = null;
>   > rect_bot = null;
>   > for (i = 0; i < BarCount; i++) {
>   > 
>   >  if (yon[ i ]) {
>   >  
>   >   for (j = i - RectangleLength + 1; j <= i; j++)
> {
>   >   
>   >    rect_top[ j ] = hg[ i ];
>   >    rect_bot[ j ] = lw[ i ];
>   >   
>   >   }
>   >  
>   >  }
>   > 
>   > }
>   > 
>   > Plot(rect_top,"Long breakout
>   > level",colorBrightGreen,1);
>   > Plot(rect_bot,"Short breakout
>   > level",colorBrightGreen,1);
>   > 
>   > Filter = yon == 1;
>   > AddColumn(yon,"Rectangle detected");
>   > AddColumn(long_breakout_level,"Long Breakout
>   > Level");
>   > AddColumn(short_breakout_level,"Short Breakout
>   > Level");
>   > 
>   > 
>   >   ----- Original Message ----- 
>   >   From: suree namsiripongpan 
>   >   To: amibroker@xxxxxxxxxxxxxxx 
>   >   Sent: Monday, November 15, 2004 11:21 AM
>   >   Subject: Re: [amibroker] Re: visualising
>   > rectangles
>   > 
>   > 
>   >   dear ed, 
>   > 
> 
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/