You probably copy pasted the code from AmiBroker Tips Weekly NewsLetter Issue 5/2000. Just for your future reference, while sharing codes - not written by yourself - please share the source or provide Credit to the author.
Roger, as you can see that its a code written in AFL about 20 years back. Since then, thanks to the Tomasz and his team, AmiBroker has evolved! Plotting using graph0
, graph1
has gone obsolete; they are just there for old-code compatibility purposes only.
Based on your request, would suggest you to study the Plot() function. And for further understanding this guide on Using graph styles, colors, titles and parameters in Indicators.
Not only that, now AmiBroker comes with many different types of Plot() function with varied spectrum providing ultimate freedom to your imagination. Such as:
- PlotForeign - plot foreign security data (AFL 2.2)
- PlotGrid - Plot horizontal grid line (AFL 2.3)
- PlotOHLC - plot custom OHLC chart (AFL 2.2)
- PlotShapes - plots arrows and other shapes (AFL 2.3)
- PlotText - write text on the chart (AFL 2.80)
- PlotTextSetFont - write text on the chart with user-defined font (AFL 2.80)
- PlotVAPOverlay - plot Volume-At-Price overlay chart (AFL 2.4)
- PlotVAPOverlayA - plot multiple-segment Volume-At-Price chart (AFL 3.20)
(Source: Categorized list of AFL functions)
This forum encourages an user for self-study instead of spoon-feeding. Hence, not posting the answer directly and hope that you will go through the references. Share your efforts and attempts for better resolutions. Also:
And Welcome!