After going thru the 4 different methods
you suggested for drawing lines, I come to the conclusion
that
using the drawing tool “horizontal line”
would be the most effective way to implement direct chart
trading.
I realize I can draw 3 horizontal lines on
the chart and then modify the properties as needed: color, study
ID, etc…
but that is not
efficient.
Also since the actual trading parameters
would need to be in AFL it seems only logical to control
horizontal lines at code level also.
So for the $64,000.00
question; Is it possible to
create/access/control all of the properties that make up
the “horizontal line” from the draw toolbar and reference them
in AFL code?
Thanks for your reponse.
From: amibroker@xxxxxxxxxps.com
[mailto:amibroker@yahoogroups.com] On Behalf Of Tomasz
Janeczko
Sent: Saturday, March 15, 2008 11:38
AM
To: amibroker@xxxxxxxxxps.com
Subject: Re: [amibroker] Question for
Tomasz?
Hello,
You can draw your lines using FOUR
different methods:
a) PlotGrid - this function allows to plot
horizontal grid line at any leve (the easiest
method)
Plot( C, "Price", colorBlack, styleCandle );
PlotGrid( LastValue( Close ), colorRed ); // this
example plots horizontal line at the value of last
close
b) Plot - using regular Plot you are able
to plot any line including horizontal lines:
Plot( C, "Price", colorBlack, styleCandle );
Plot( LastValue( C ), "LastClose", colorRed ); // this
example plots horizontal line at the value of last
close
c) you can draw trendlines (not only
horizonal) using combination of Plot and
LineArray:
Examples here:
http://www.amibroker.com/f?linearray
d) you can draw ANYTHING you can imagine,
using low level gfx:
http://www.amibroker.com/guide/a_lowlevelgfx.html
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message
-----
From: KBH
To: amibroker@xxxxxxxxxps.com
Sent: Saturday, March 15, 2008 8:50
PM
Subject: [amibroker] Question for
Tomasz?
Tomasz,
Are the properties that define the drawing
tools somewhere in an AFL code? In other words I want to be able
to
create a horizontal trend line thru AFL
code and be able to control its behavior in my code.
The goal is trading from price chart by
creating horizontal trend lines that would trigger entries, set
stops and
targets, with a click of a button I want to
place 3 or more trend lines in price pane and then be able to
adjust
there location, once set then arm them and
when price crosses orders are sent out.
I understand that I could use the
horizontal trend line drawing tool to create 3 trend lines then
go to properties
and set the study ID of each line. But I
want to automate the process thru AFL.
Thanks for your input.
No virus found in this outgoing
message.
Checked by AVG.
Version: 7.5.519 / Virus Database:
269.21.7/1330 - Release Date: 3/15/2008 2:36
PM
No virus found in this incoming
message.
Checked by AVG.
Version: 7.5.519 / Virus Database:
269.21.7/1330 - Release Date: 3/15/2008 2:36
PM
No virus found in this outgoing
message.
Checked by AVG.
Version: 7.5.519 / Virus Database:
269.21.7/1330 - Release Date: 3/15/2008 2:36
PM
No virus found in this incoming
message.
Checked by AVG.
Version: 7.5.519 / Virus Database:
269.21.7/1330 - Release Date: 3/15/2008 2:36
PM
|