I have tried to add a second vertical line with this code:
line1 = DateNum() == ParamDate("Date", "01/01/2009", 0);
line2 = DateNum() == ParamDate("Date", "31/01/2009", 0);
Plot(line1, "", colorRed, styleHistogram | styleOwnScale | styleNoLabel);
Plot(line2, "", colorBlue, styleHistogram | styleOwnScale | styleNoLabel);
Plot(Close, "Close", colorDarkGrey, styleBar);
However, it recognises only the a single line. Any suggestions?
Geoff
sfclimbers wrote:
The following AFL will allow you to pick a Date via the Parameters
menu of your chart (i.e. right click on chart and select Parameters).
A red vertical line will be drawn for that date and remain constant
across all symbols until you change the parameter value.
In the interest of providing a complete example, I've also plotted
price. You can remove the second Plot for your own chart.
line = DateNum() == ParamDate("Date", "01/01/2009", 0);
Plot(line, "", colorRed, styleHistogram | styleOwnScale | styleNoLabel);
Plot(Close, "Close", colorDarkGrey, styleBar);
Mike
--- In [email protected] <mailto:amibroker%40yahoogroups.com>,
"wrzec" <williamze...@...> wrote:
>
> I have been trying to find any information on adding vertical lines
to my charts. The vertical line tool on the chart tools menu will work
but the lines are linked to that symbol only. I am looking for
something that will remain fixed on my charts no matter what chart I
am scrolling through. It would solve my problem if the layers tool had
some type of setting that enabled the highlighted dates to remain
fixed on the chart sheet or there were some type of afl that would
work. I have searched the groups database for information but didn't
find anything. Any ideas or suggestions??
>
>
> Thanks,
> William
>
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.76/2344 - Release Date: 09/03/09 18:05:00
--
Geoffrey Keenan
[email protected]
0417 863 261