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

Re[2]: MarketPr*file .ELA code error



PureBytes Links

Trading Reference Links

In order to get this code to Verify, the line    et=Addtime(st,minadd);  needs
the User Function Addtime. 

If someone could post that function I would be appreciative.




____________________Reply Separator____________________
Subject: Re: MarketPr*file .ELA code error
Author: Bob Hunt
Date:  7/25/99 8:01 AM

You're missing a significant chunk out of the code. That's why it
won't verify.     Try this one.

Bob Hunt
---------------------------------------------------------------

{indicator: mpro4.0 (m***** profile style plot) put on a 1-tick chart
of day session bonds, set for 1 day of data. set data style to
invisible bars, set scaling to entire data series for both data & this
indicator. set indicator properties to subgraph hidden, maxbarsback=0,
update every tick. 1st tick(open) price row is red, all others are
yellow, red trendline shows last tick. colors,etc. are harcoded but
easily changed. best viewed on black background chart. note: plot is
at FAR LEFT edge of chart, so scroll chart all the way to left and
leave it there! bar spacing should probably be set to minimum. }

vars:lett("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),lcount(1),fp(0),xp(0),z(0),xp1(0)
;
vars:hh(0),ll(0),x(96),count(0),y(100),minadd(30),et(0),st(720),
clet("_A"),curtxt("");
array:pri[200](0);

if CurrentBar=1 then begin 
et=Addtime(st,minadd);
fp=c; {first price, used to calc offset of later ticks in xp calc
below}
for y=1 to 200 begin {initialize all possible text ref locations}
pri[y]= text_new(d,st+1,c-3+y points,".");
TEXT_SETCOLOR(pri[y],7); {yellow}
TEXT_SETSTYLE(pri[y],0,2); 
end;
curtxt=text_getstring(pri[x]); 
text_setstring(pri[x],curtxt+clet);
TEXT_SETCOLOR(pri[x],6); {make opening price red }
hh=c;ll=c;
end;
xp1=xp;
xp=intportion((3+c-fp+0.005)/0.03125) - 96;
IF T >= ET then begin {a new time period just started}
lcount=lcount+1; {letter count : 1=A,2=B,..}
clet="_"+midstr(lett,lcount,1) ;
et=addtime(et,minadd);
hh=c;ll=c;
curtxt=text_getstring(pri[x+xp]);
text_setstring(pri[x+xp],curtxt+clet);
end;

if c > hh or c < ll then begin
if c>hh then hh=c;
if c<ll then ll=c;
if xp1 < xp then value3=xp else value3=xp1-1;
if xp1 < xp then value2=xp1+1 else value2=xp;
for value4=value2 to value3 begin {fill gaps if any}
curtxt=text_getstring(pri[x+value4]);
text_setstring(pri[x+value4],curtxt+clet);
end;
end;

if t > st then begin {plot line to show last tick} 
z=z+1;
if z=1 then begin
value10=tl_new(d,st,c,d,t,c);
tl_setcolor(value10,6);
tl_setsize(value10,1);
end else begin
tl_setbegin(value10,d,st,c);
tl_setend(value10,d,t,c);
end;
end;

plot1(c,"dummy");