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.
Size:
Color:
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)?
Size:
Color:
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.
Size:
Color:
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.
Size:
Color:
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.
Size:
Color: