External symbol appears as almost straight line
Author: traderray
Creation Date: 5/14/2010 7:00 AM
profile picture

traderray

#1
I have a problem using an external symbol on intraday charts. Following is the coding causing the problem.

CODE:
Please log in to see this code.


I am using a 1 minute dataset. I am using 600 bars for the data range. When I am using a 1 minute time frame, it works ok. When I change to a 5 minute time frame, the chart for "DIA" shows data starting at zero which causes the data for "DIA" to appear almost as a straight line. There also is no data for "DIA" more than 120 bars ago.
profile picture

Eugene

#2
QUOTE:
When I change to a 5 minute time frame, the chart for "DIA" shows data starting at zero which causes the data for "DIA" to appear almost as a straight line.

Any data spikes in "DIA"?
QUOTE:
There also is no data for "DIA" more than 120 bars ago.

How many bars loaded (i.e. data range)?
profile picture

traderray

#3
The data looks ok for DIA. It actually works the same if I change DIA to other symbols. All symbols appear to have the same problem.

On a 600 bar chart, it loads approximately bar 480 to 599. It will vary by a couple of bars as I change the symbol. If I go to a 700 bar chart, it loads approximately bars 555 to 699. On an 800 bar chart, it loads approximately bars 640 to 799.....

If I click on the same symbol that I am getting thru the getexternalsymbol, it works ok.
profile picture

Eugene

#4
QUOTE:
If I click on the same symbol that I am getting thru the getexternalsymbol, it works ok.

It's called synchronization. You can find out more by reading DataSeries > Accessing Secondary Symbols > Secondary Series Synchronization in the WealthScript Programming Guide.
profile picture

Cone

#5
Ray, is DIA in the same 1-minute DataSet as the one you're using? If not, it could be accessing data from a DataSet in the Daily scale. Note that GetExternalSymbol has an overloaded parameter to specify the DataSet from which to take the secondary data. You should use it when working with secondary symbols from different DataSets, that way there's no ambiguity as to which data is being read.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).