Sei sulla pagina 1di 6

15/1/2010 AmiBroker Users’ Knowledge Base » AFL …

Users' Knowledge Base


Share your experience, code and everything with other AmiBroker
Users’.

March 15, 2008

AFL Shapes Cheat Sheet

The plotshapes() can be used to plot shapes on your chart to indicate signals, stops, and other events and
conditions. Figure 1 below gives a quick overview of the shapes that are available and includes a few
undocumented ones. A PDF version suitable for printing is here: AFL Shapes Cheat Sheet

amibroker.org/…/afl-shapes-cheat-sheet/ 1/6
15/1/2010 AmiBroker Users’ Knowledge Base » AFL …

Figure 1

Figure 2 shows the small AFL program that was used to explore all the built-in shapes and their numerical values.

1 for ( i = 0; i < BarCount; i++ )


2 {
3 O[i] = C[i] = i;
4 H[i] = i + 5;
5 L[i] = i - 5;
6
7 if ( i % 2 == 0 ) {PlotText( NumToStr( i, 1.0, False ), i, L[i]-2, colorDarkGrey );}
8 else {PlotText( NumToStr( i, 1.0, False ), i, H[i]+.5, colorDarkGrey );}
9 }
10 PlotShapes( C, colorRed, 0, C, -10 );
11 Plot( C, "", colorLightGrey, styleBar );
12

amibroker.org/…/afl-shapes-cheat-sheet/ 2/6
15/1/2010 AmiBroker Users’ Knowledge Base » AFL …
13 Title = "Hollow = " + NumToStr( shapeHollowCircle - shapeCircle, 0, 0 ) + "\n" +
14 "Small = " + NumToStr( shapeSmallCircle - shapeCircle, 0, 0 );

Figure 2

With additions by Herman

Filed by Dennis Brown at 5:01 pm under AFL - The Basics

(5 votes, average: 4.8 out of 5)


Loading ...

5 Responses to “AFL Shapes Cheat Sheet”


1. brian_z
March 15th, 2008 | 10:28 pm

Welcome to the UKB.


I’m dancing and having a glass of champagne here.
Extending our knowledge, even on the simple things, can save a lot of heartache later when we want to do
something for the first time.

I’m having trouble copying the code because it isn’t wrapped - it is all on one line.

Thanks.

2. brian_z
March 16th, 2008 | 10:47 am

I see you have fixed it,


Nice work.

3. Progster
March 17th, 2008 | 11:49 am

amibroker.org/…/afl-shapes-cheat-sheet/ 3/6
15/1/2010 AmiBroker Users’ Knowledge Base » AFL …
I think left triangle and right triangle would be very helpful additions to AB’s list of available shapes.

I find a chart display that marks the entry price with a right triangle, and the exit price with a left triangle,
and with a line drawn between them, to be the easiest to immediately understand (and use to verify visually
a list of trades).

Something like this (for a short trade):

>.
.
.
.
.

4. Progster
March 17th, 2008 | 11:51 am

Well, my prior message did not post correctly, and I can’t edit it or delete it.

Sigh …

5. Dennis
April 12th, 2008 | 12:31 am

Progster, It would be nice to have a larger pallet of symbols. However, you may well get what you want
(more or less) by doing something else I do. I combine two or more symbols together to make a more
complex symbol. For instance, you could plot an up and down triangle in such a way that it looks like a
diamond, Or put a small red dot inside a blue square, etc. One I use a lot is to put an arrow coming out
the top or bottom of a digit. That is how I mark the number of contracts to be bought or shorted on the
next bar. It couls also be used to determine the type of signal that generated the trigger, or the number of
triggers, etc.

Leave a reply
name (required)

email (will not be shown) (required)

website

Submit Comment

Search

Info
amibroker.org/…/afl-shapes-cheat-sheet/ 4/6
15/1/2010 AmiBroker Users’ Knowledge Base » AFL …

Table Of Contents
Contributor Agreement
About
Author Guide
Contacts
FAQ
Terms of Use

Recent Posts
Plotting trades on chart
Date and Time to Number Conversions
Popup Window: Preventing pile-ups
Wordpress upgrade
US-Stocks Database (v2)

Recent Comments
Herman on High-Precision Delay and Interval Timing
Tomasz Janeczko on High-Precision Delay and Interval Timing
Tomasz Janeczko on Static Variables in RT Systems
Yofa on Real-Time Bar Period Timing
Anthony Abry on Introduction to Trading Systems - Management

Categories
Select Category

Archives
February 2009 (2)
August 2008 (1)
April 2008 (1)
March 2008 (20)
February 2008 (6)
January 2008 (1)
December 2007 (4)
November 2007 (18)
October 2007 (17)
September 2007 (17)
August 2007 (26)
July 2007 (20)
June 2007 (17)
May 2007 (8)
April 2007 (16)
January 2007 (1)

Meta
Log in
Entries RSS
Comments RSS
amibroker.org/…/afl-shapes-cheat-sheet/ 5/6
15/1/2010 AmiBroker Users’ Knowledge Base » AFL …
WordPress.org

Copyright (C)2006 AmiBroker.com.


This site uses WordPress Page generated in 0.331 seconds.

amibroker.org/…/afl-shapes-cheat-sheet/ 6/6

Potrebbero piacerti anche