PureBytes Links
Trading Reference Links
|
Gary Fritz wrote:
> Now, just for completeness, what happens if there's no data on data1
> but there is on data2? There you're out of luck. Indicators and
> systems only get executed at the close of a bar on *data1*. So if
> there's no bar on data1, your indicator code won't see it.
It appears that the time scale on a chart will fill in the time for ANY
bars found in data1 or data2. So if data1 is missing a minute but data2
has a bar for that minute the time will be stamped on the chart and
appear in the data window. However, as Gary points out an indicator
(e.g., plot1(c data2)) will only plot in data2 when a bar exists on
data1. But see below.
The missing bars indicator I just posted presents an anomaly that
hopefully someone can explain. The table below shows the data.
The anomaly appears three times, at 1322, 1324 and 1325. But 1322 data1
is missing and therefore the code should not be executed but a print
occurs for 1322. This must be due to 1322 data2 (anomaly 1) which is not
missing! The second 1322 must result from the code being executed on
1323 data1 but since 1323 data2 is missing here, this second 1322 is the
stored previous value, 802, of the variable TimeToMin(T). The code is
executed without a data2!
1324 data1 is missing but a print for 1324 occurs. This must be due to
1324 data2 (anomaly 2)! How did the code execute here? Notice there was
NO plot1 recorded on the print statement or on the chart even though the
"if TimeToMinutes(T) > TimeToMinutes(T[1]) +1 then plot1(h+.005*c,"")"
is true!
Both a print and chart plot1 occur at 1325 data1 and 1325 data2
(anomaly3)! How is the "if TimeToMinutes(T) > TimeToMinutes(T[1]) +1
then plot1(h+.005*c,"")" tiggered when it not true at 1325? And why is
there a print of plot1 at 1328 and 1329 ?
Data1 and data2 streams seem to have many hidden characteristics.
Table is for TKLC data1 and TLAB data2. A gif of the chart is sent
under a separate post to avoid the 20K limit.The table was obtained with
the print statement,
print(d,t,TimeToMinutes(T), TimeToMinutes(T[1]), plot1 ), loaded into
data2 in the Missing Bars indicator .
Date Time TimeTo TimeTo plot1 plot1 on
Min(T) Min(T[1])print chart
1020311 1316 796 795
1020311 1317 797 796
1318 data1 and data2 are missing
1020311 1319 799 797 12.82 yes
1020311 1320 800 799
1020311 1321 801 800
1020311 1322 802 801
1322 data1 is missing
1020311 1322 802 801
1323 data2 is missing
1020311 1324 804 802
1324 data1 is missing
1020311 1325 805 804 12.82 yes
1326 data1 and data2 are missing
1020311 1327 807 805 12.82 yes
1020311 1328 808 807 12.82
1020311 1329 809 808 12.82
1328 and 1329 data1 are missing
|