Accessing Foreign data bars


I started with the basic normalisation chart and modified it with my own ideas. I've been successful other than one improvement I'd like to make but cant solve it the way I'd like so looking for alternatives.

My only issue is say I am using a watchlist of say 5 symbols with different amounts of history. As I scroll along they gradually calculate as zero becasue they run out of start data i.e it is empty.

The solution to me seems simple in that I search thru each foreign symbol array to find the first value that exists and I set that as the start point for each symbol where fvb returns empty.

I understand the built in functions refer to the symbol linked to the chart selected in the drop down box and I'm having trouble working with the foreign bars. So far I have not been able to work out how many bars exist or their amount in a foreign symbol. I haven't been able to find a function that allows me to do it.

I've read the manual, looked at the tutorials, searched for examples and sat there for hours watching the interpretation window try to see why I cant access those bars.

If someone could point me in the right direction that would be much appreciated.

I should note I've disabled quickafl I just find it's nature of changing the context of functions confusing and hard to troubleshoot.

I am also in indicator mode.

I thought I may have been able to do it by:

fcname= name()
fcbars = BarCount

After I do that I can see the default indicator symbol sets to the foreign symbol (name, O,H, L, C etc.) but BarCount() etc still refers to the symbol selected in the drop down box.

Ok. My error on BarCount as it returns same becasue sync'd.

Solved it using IsEmpty and looping thru each foreign symbol to find first non empty bar.

Can close thankyou.

@Nayaron, you can avoid looping using the NullCount() function.


@beppe thank you very much that worked a treat.

Can't believe I never came across that formula in all my searching.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.