### PlotForeign - plot foreign security data

Referencing other symbol data
(AFL 2.2)

 SYNTAX PlotForeign( tickersymbol, name, color/barcolor, style = styleCandle | styleOwnScale, minvalue = {empty}, maxvalue = {empty}, XShift = 0, ZOrder = 0, width = 1 ) RETURNS NUMBER FUNCTION Plots the foreign-symbol price chart (symbol is defined by tickersymbol parameter). Second argument name defines graph name used for displaying values in a title bar. Graph color could be static (if third argument is a number) or dynamic (when third argument is an array). Color indexes are related to the current palette (see Preferences/Color) style defines chart plot style (see Plot() function for possible values) minvalue and maxvalue - (used by styleOwnScale plots ONLY) define plot minimum and maximum values (lower and upper boundary for Y axis) XShift - allows to visually shift the chart into future (blank) bars. ZOrder - this parameter takes precedence over the order of calling Plot() functions, so if z-order is set, it determines plotting order. See http://www.amibroker.com/gifs/zorder.gif If multiple plots use the same z-order parameter they are plotted in reverse call order (ones that appear last in the code are plotted first). This rule can be changed by already existing switch graphzorder = 1 which, when specified, reverses this behaviour (so plots are drawn in call order). Please note the above applies to each zorder "layer" separately (so within same zorder "layer" reverse call rule applies). This may sound complicated but is required for backward compatibility. width - defines pixel or percent width of given plot. The default is 1 pixel. Positive values specify PIXEL width, negative values specify width in percent of current bar width. So for example -20 will give you dynamic width that is 20% of bar width. Example: Plot( C, "Close", colorBlack, styleBar, Null, Null, 0, 1, -20 /* line width as percent of bar */ ); EXAMPLE PlotForeign( "^DJI", "Dow Jones", colorRed ); SEE ALSO

#### References:

The PlotForeign function is used in the following formulas in AFL on-line library: