[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data1,Data2 Missing Bars



PureBytes Links

Trading Reference Links

The conclusions below about how TS 2000/sp5 handles variables and plotX
in data1 and data2 streams with missing bars, stem from observing the
print statement added to the indicator, Missing Minutes, that I posted
on the list 12 Mar 2002 10:19. 

That code was loaded into the data2 chart. The print statement shows any
missing bars in data2 by there not being a print at the time of the
missing bar.


    if TimeToMinutes(T)>TimeToMinutes(T[1])+1 then
plot1(h+.005*c,"");     
    if TimeToMinutes(T)>TimeToMinutes(T[1])+2 then plot2(h+.01*c,""); 
    if TimeToMinutes(T)>TimeToMinutes(T[1])+3 then plot3(h+.015*c,""); 
    if TimeToMinutes(T)>TimeToMinutes(T[1])+4 then
plot4(h+.02*c,"");      

    if TimeToMinutes(T)>TimeToMinutes(T[1])+5 then plot1(l-.005*c,""); 
    if TimeToMinutes(T)>TimeToMinutes(T[1])+6 then plot2(l-.01*c,""); 
    if TimeToMinutes(T)>TimeToMinutes(T[1])+7 then plot3(l-.015*c,""); 
    if TimeToMinutes(T)>TimeToMinutes(T[1])+8 then plot4(l-.02*c,"");

     print(d,t,TimeToMinute(T), TimeToMinute(T[1]), plot1);


The following print code was loaded into the data1 chart. The output is
shown on the far right side of the data table below. It shows any
missing bars in data1 by there not being a print at the time of the
missing bar. Multiple, same entres in data1 are due to data2 bars when
there is

not a data1 bar. 

       print(d,t)

The symbols used, ONIS  (data1) and TKLC (data2), have many missing
minutes bars. The table of data below shows on the left side, time
stamps for the bars in both data streams. Those in parenthesize are for
missing bars. They show in the print statement as multiple entries. See
1426, 1437, 1450, 1452, 1454, and 1501 for the data1 print(d,t). These
secondary time prints for data1 are occurring on data2 bars (and those
secondary time prints for data2 are due to data1 bars). The plots on the
chart are noted with a "Y(x)" where (x) is the number of missing bars.

A bar in either data stream 1 or 2 will cause the code in BOTH data1 and
data2 to be executed, i.e. run through. That is, if only one data bar
occurs, either 1 or 2, the code in both data 1 AND 2 is executed. All
new values of variables (including plot1) may be recalculated based on
the 

current bar (whither it is data1 OR data2) BUT PLOT1 ONLY PLOTS IN THE
CHART ON A DATA1 BAR. If there are no new values for a data stream then
the previous, last up dated ones are carried forward until new values
(bars) occur. See the data table below.

In data2 if new value of plot1 occurs (due to missing data2 bars) it
replaces the previous one even if the previous one has not yet been
plotted on the chart due to no data1 bar. This happens if data2 has a
missing bar, then a bar, then another missing bar before a data1 bar
occurs. See 

data2 time 1501 through 1506.

PlotX seems to be function that only data1 will plot on a chart. But
here anyway,data2 does determine the value of plotX and what bar it
occurred on. This information is stored somewhere until a data1 bar
occurs, then is plotted on the chart. It seems no missing data2 bars are
overlook, just delayed until a data1 bar occur to cause the imprinting
to the chart. 

This is not the case with TS 4. If a data1 bar is missing at the time a
data2 bar occurs after a missing data2 bar, then no plotX transfer to
the chart occurs.

>From my limited work, it seems the plotX function is unique in needing a
data1 bar to imprint on the chart. Other functions transfer right from
data2 to the chart. See the gif TS 2000 for TL_New(d1,t1,p1,d2,t2,p2),
which only needs a data2 bar to draw to the chart. TS 4 operates 

differently (see the TS 4 gif). Perhaps the plotX calculation in data2
in TS 4 is not stored until a data1 bar occurs so that the information
is lost, unlike TS 2000. 

In the larger gif labeled TS 2000 the blue dots are from plotX in the
above Missing Minutes code. The number of dots show the number of
missing bars in data2. They only occur on a data1 bar and may be
displaced later in time. The red dots are due to the new Missing Minutes
code using 

TL_New(d1,t1,p1,d2,t2,p2). After any missing bars, they appear
immediately on the next data2 bar even if no data1 bar simultaneous
exists. This shows that the code above, in data2, is executed without a
data1 bar. 

The other two smaller gifs (TS 2000 and TS 4) show the above Missing
Minutes code in TS 2000 and TS 4. They can be compared directly as they
each have the same bar set. This was accomplished by editing the TS 4
data and I did not try to match the price for each so many of the prices
for the 

same time are different . It only matters that the bars match timewise.  

TS 2000 does not omit detecting missing bars (except as illustrated
during  time 1501 through 1506) whereas TS 4 completely misses plotting
if the is no data1 bar at the right time, e.g., at 2:29, 2:41, 2:51, and
2:53.



ONIS data1,   TKLC data2    02_03_22

Data1	Data2	TTM	TTM[1]	plot1   Plot on      print(d,t)
Bars	bars				 Chart        data1

1426	1426	 866	 865	0
(1426)	1427	 867	 866	0			1422
------	-------						1423
(1426)	1429	 869	 867	0			1424
(1426)	1430	 870	 869	0			1425
1431	1431	 871	 870	11.66	 y(1)		1426
------	-----						1426
1433	(1431)	 871	 870	0			1426
-----	-----						1426
1435	1435	 875	 871	11.66	 y(3)		1431
------	-----						1433
1437	(1435)	 875	 871	0			1435
------	------ 						1437
------	------						1437
(1437)	1441	 881	 875	0			1442
1442	(1441)	 881	 875	11.53	 y(5)		1445
1445	(1441)	 881	 875	0			1446
1446	1446	 886	 881 	11.65	 y(4)		1447
1447	1447	 887	 886	0			1448
1448	1448	 888	 887	0			1449
1449	(1448)	 888	 887	0			1450
1450	(1448)	 888	 887	0			1450
-----	------						1452
(1450)	1451	 891	 888	0			1452
1452	(1451)	 891	 888	11.74	 y(2)		1454
(1452)	1453	 893	 891	11.74			1454
1454	(1453)	 893	 891	11.68	 y(1)		1456
(1454)	1455	 895	 893	11.68			1458
1456	(1455)	 895	 893	11.66	 y(1)		1459
------	-----						1500
------	-----						1501
1458	1458	 898	 893	11.73	 y(4)		1501
1459	(1458)	 898	 893	0			1501
1500	(1458)	 898	 893	0			1507
							1508
1501	1501	 901	 898	11.72	 y(2)		1509
-----	-----						1510
(1501)	1503	 903	 901	11.72			1511
-----	------						1512
(1501)	1506	 906	 903	11.72
1507	(1506)	 906	 903	11.78	 y(2)
1508	1508	 908	 906	11.77	 y(1)
1509	1509	 909	 908	0
1510	(1509)	 909	 908	0
1511	(1509)	 909	 908	0
1512	1512	 912	 909	11.72	 y(2)

Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""