Multi-Ticker plots changes by chosen ticker

Dears, Good day to you all,

I Have a question, Why when I plot multi-ticker chart the plotted lines give different results when I choose different tickers. I use foreign () ant that situation continues wither I set fixup argument of foreign () to 0 or 1.

Thank you in advance.:sunglasses:

Foreign symbols are aligned over the base ticker.

If you scroll through the (base)chart tickers, and all the base tickers have holes themselves, then obviously even the same foreign symbol will appear differently.

Thank you @travick, wither I set fixup to 0 or to 1 the same situation continues.

@mohamed.gad Foreign data used in Indicator formulas are aligned to the current symbol (not as in case of Automatic Analysis, to the Reference symbol specified in AA Settings), so simply choose the most liquid one - having the least amount or preferably no data holes at all (for instance Index etc.) to plot other (foreign) symbols.

Read this:

http://www.amibroker.org/userkb/2007/06/26/data-holes-in-real-time-trading/

1 Like

Thank you @Milosz , by confirming that this difference is only related to data holes I think the next logic step is to force the base ticker for Index, is there are any possibility to force specific ticker and ignore the manual selection form AB or I have to assign such plots to specific tab and use lock symbol functionality.

I would simply choose this preferred symbol and use Symbol lock (and Interval lock if necessary).

1 Like

It`s OK, lets keep it simple, Thanks @Milosz :+1:

1 Like

For what it is worth: I am strongly AGAINST using "multi ticker plots" like this to plot charts of multiple symbols in grid-like fashion. Instead you should use
Window->Tile built-in funcitonality.

Why? Because it is MUCH SLOWER to draw charts using low-level graphics and much slower to use Foreign and you don't get benefit of QuickData tech that is available in tiled charts.

Thank you @Tomasz , I use such graphs to study the relative performance of different tickers using some functions applied simultaneously to all tickers So it is important for me to observe results on the same scale. however as you said the performance is

But I have to waive performance to increase knowledge space per unit area of screen.

@Tomasz I think, that @mohamed.gad wasn't clear enough in his initial post. At the beginning I wasn't sure what kind of situation was he describing (attaching example screenshot could help), but if I understand correctly he is simply using Foreign() or PlotForeign() to plot a few foreign symbols in a single chart pane. He doesn't want to create a matrix of several separate charts/graphs in grid-like fashion (contrary to this thread: Multiple Low Level Graphics Charts) and he is not using Gfx functions at all.

For this reason I'm not sure (maybe I'm wrong) if your above reply is fully applicable in this case.

Regards.

Thank you @Milosz, you are right and I only have one graph with multiple ticker, excuse me if the description of situation made you confused but I thought the text description to the problem "data variation according to selected base ticker" was enough.

Thanks

Attaching a screenshot in problematic situations is always a good idea, because the initial post should leave no room for speculation. For example you could have also been using one chart window with several panes - each showing a different ticker, with the use of PlotForeign, like this (one chart window with two panes):

obraz

AmiBroker is a very versatile software and you can display the same graph in several different ways ...

Dear @Milosz thank you for your effort, here are the figures that show difference in result according to selected base ticker. Both figures are of the same tickers and in the same time range but the data differs according to the selected base ticker.
1 2

Thank you.

In that case it is not a problem :slight_smile: As you noticed, it wasn't perfectly clear what OP is after.

@mohamed.gad - Foreign() function has a comment in the User's Guide: http://www.amibroker.com/f?foreign that should be read by people using that function. It provides the explanation you need.

This is what Users' Guide says about Foreign function:

Foreign function synchronizes the data file you are referencing with the currently selected symbol.

Synchronization makes sure that EACH bar of FOREIGN data matches exactly with each bar of currently selected symbol.

So if DateNum() function returns 990503 for given bar then Close array represents the CLOSE of currently selected symbol at May 3, 1999 and Foreign("SYMBOL", "C") represents close of foreign symbol at May 3, 1999 TOO.

This is absolutely necessary because otherwise you won't be able to do ANY meaningful operations involving both selected symbol and foreign symbol.

This also needed for the display so when you mark the quote with vertical line it will always match the date displayed regardless if you use Foreign or not.

Please note that if you have data holes in currently selected symbol then in order to synchronize bars Foreign function will remove bars that exist in Foreign symbol but do not exist in currently selected symbol.

1 Like

Thank you @Tomasz, that clearly explains the situation

Thanks again :+1::+1: