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

Re:upticks and downticks in radarscreen



PureBytes Links

Trading Reference Links

On Mon, 22 Dec 2003 19:45:02 Romi Ghose wrote:

"It seems RadarScreen interprets upticks as volume and zeroes out
downticks (however, charts do not, as you know).  Is there a way to use
upticks and downticks in RS...perhaps by way of a gloval var or some
other trick?"



By using a global variable (GV) it is possible to show in RadarScreen
(RS), with a data compression setting of 1 or 5 minutes, the volume of
the upticks and downticks for each tick bar. The code is below (here I
used Hashnumb ( http://www.investlabs.com/  ) but any other GV could be
used).

Romi points out the problem in his post. Namely, that the parameters
upticks and downticks in RS, represent the sum of total ticks per unit
time and nothing (zero!) respectively. 

q_upvolume and  q_downvolume return at any compression the total
upticks  and downticks per unit time. The EL dictionary does not show
these but the online user manual does which indicates they "can only be
referenced when writing analysis techniques for RadarScreen and
OptionStation".  These q_ parameters can not be stored tick by tick in
an array during a 1 or 5 minute interval. Even tho the print screen
shows each total tick volume during the 1 or 5 minute bar, only at the
close of the 1 or 5 minute bar will a value (the total volume) be
recorded in the array, somewhat like in a strategy. This is why a GV
must be used to store each tick volume within the 1 or 5 minute bar.

If the code does not work then after you paste the code into PE, under
properties (r clik) set "Load additonal data .." to 10 or more for past
history.

The .001* is to get rid of trailing zeros.





if currentbar=1 then begin
DefineDllFunc:"e:\hashserv32\HashClient32.dll",INT,"putNo",LPSTR,LONG,FLOAT;
DefineDllFunc:"e:\hashserv32\HashClient32.dll",INT,"cleanObject",LPSTR;
DefineDllFunc:"e:\hashserv32\HashClient32.dll",FLOAT,"getNo",LPSTR,LONG;
cleanobject("rad");
end;

var: x(0), y(0),y2(0),y3(0),z(0), w(0),w2(0),z1(0),
w1(0),x2(0),x3(0),z2(0), volup(0), voldn(0);

x=q_upvolume;   {at any compression the total upticks and downticks
perunit time}
y=q_downvolume;
	
x2=getNo("rad", 1);   {get pervious value of z (total uptic) and w
(total dntic)}
y2=getNo("rad", 3);

putNo("rad", 2, x2);   {store pervious value of z and w }
putNo("rad", 4, y2);

z=(x-x[1]);            {calculate new value of z and w }
w=(y-y[1]);	

putNo("rad", 1, z);     {store new value of z (total uptic) and w (total
dntic)}
putNo("rad", 3, w);

x3=getNo("rad", 2);     {get pervious value of z and w }
y3=getNo("rad", 4);

z2=z - x3;          {calculate last uptic and downtic at current bar}
w2=w - y3;	

if z<>0 and z>0 then plot1(.001*z);  {upticks per unit time at any
compression}
if w<>0 and w>0 then plot3(.001*w);  {downticks per unit time at any
compression}

if z2<>0 and z2>0 then plot2(.001*z2);  {last uptick per bar at any
compression}
if w2<>0 and w2>0 then plot4(.001*w2);  {last downtick per bar at any
compression}



wayne