[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: Sun, 14 Nov 2004 06:43:34 -0800 (PST)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

PureBytes Links

Trading Reference Links

Dear Ed, 

I have already tried your code in my country index,
i.e. ^SETI, I can see only the 2 white lines and 2 red
lines.

I tried to imagin to see the triangles, but i cannot
spot.  Can you explain a bit more details....

thanks. 


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

> iascool,
> 
> in the Conway book they explain how to use
> rectangles in a trading system. Rectangles precede a
> breakout either on the long or on the short side.
> Their system goes either long or short at the bar
> following a rectangle if the price goes above /
> below a certain value.
> 
> This code is only to play around and see what
> happens in the chart. If you want to use the concept
> in a system you'll have to do some additional
> programming,
> 
> rgds, Ed
> 
>   ----- Original Message ----- 
>   From: iascool 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Sunday, November 14, 2004 12:53 PM
>   Subject: [amibroker] Re: visualising rectangles
> 
> 
> 
>   If you dont mind can u also share its significance
> and application
> 
>   Regards
>   --- In amibroker@xxxxxxxxxxxxxxx, "ed nl"
> <ed2000nl@xxxx> wrote:
>   > /*
>   > 
>   > Rectangle Development
>   > 
>   > after: "Professional Stock Trading", M. Conway /
> A. Behle, 2003, 
>   pages 106, 107, 108
>   > 
>   > Edward Pottasch, nov 2004
>   > 
>   > */
>   > 
>   > RectangleLength = 8;
>   > RangeLength = RectangleLength * 3;
>   > RangeFactor = 1.5;
>   > RangeRatioLimit = 0.3;
>   > AtrPeriod = RangeLength;
>   > 
>   > // rectangle
>   > hg = SelectedValue(HHV(H,RectangleLength));
>   > lw = SelectedValue(LLV(L,RectangleLength));
>   > HeightRectangle = hg - lw;
>   > 
>   > // preceding range
>   > hgp =
> SelectedValue(Ref(HHV(H,RangeLength),RectangleLength
> * -1));
>   > lwp =
> SelectedValue(Ref(LLV(L,RangeLength),RectangleLength
> * -1));
>   > HeightRangeLength = hgp - lwp;
>   > 
>   > // aspect ratio
>   > ar = HeightRectangle / HeightRangeLength;
>   > 
>   > // ATR
>   > at = SelectedValue(ATR(AtrPeriod));
>   > 
>   > // decide if it is a rectangle
>   > yon = IIF(ar < RangeRatioLimit AND
> HeightRectangle < at * 
>   RangeFactor, 1, 0);
>   > 
>   > // visualize the rectangle
>   > x = Cum(1);
>   > lastx = LastValue(x); 
>   > selv = SelectedValue(x);
>   > 
>   > // the rectangle
>   > xx = IIF(x > selv - RectangleLength AND x <=
> selv, x - (selv - 
>   RectangleLength),null);
>   > yy_l = lw + 0.0 * xx;
>   > yy_h = hg + 0.0 * xx;
>   > Plot(yy_l, "",
> IIF(yon,colorBrightGreen,colorRed), IIF(yon,4,1));
>   > Plot(yy_h, "",
> IIF(yon,colorBrightGreen,colorRed), IIF(yon,4,1));
>   > 
>   > // preceding range
>   > xx = IIF(x > selv - RectangleLength -
> RangeLength AND x <= selv - 
>   RectangleLength, x - (selv - RectangleLength -
> RangeLength),null);
>   > yy_l = lwp + 0.0 * xx;
>   > yy_h = hgp + 0.0 * xx;
>   > Plot(yy_l, "", colorWhite, 1);
>   > Plot(yy_h, "", colorWhite, 1);
>   > 
>   > Plot(C,"",colorwhite,64);
>   > 
>   > "Aspect Ratio: " + writeval(ar);
>   > "Height rectangle: " +
> writeval(HeightRectangle);
>   > "ATR * Rangefactor: " + writeval(at *
> RangeFactor);
>   > "Rectangle detected: " + writeif(yon," TRUE","
> FALSE");
>   > 
>   > [Non-text portions of this message have been
> removed]
> 
> 
> 
> 
> 
>   Check AmiBroker web page at:
>   http://www.amibroker.com/
> 
>   Check group FAQ at:
>
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
> 
>
------------------------------------------------------------------------------
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>       
>     b.. To unsubscribe from this group, send an
> email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c.. Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of Service. 
> 
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 



		
__________________________________ 
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/