PureBytes Links
Trading Reference Links
|
Hi, I am trying to make an indicator that will plot a running count like 4,
8, 12, 16 . . . on my chart starting from a specified date and only
plotting (the count)above every fourth bar. I gave it a try (see below) and
although the count is right, I get the count plotted above every bar instead
of every fourth one. Thanks.
Brent
Input: COLOR(Tool_White), Strtdate(0), Run(4);
Var: count(0), newtext(0), sbar(0);
if date = Strtdate then
sbar = currentbar;
if sbar <> 0 then begin
count = count + Run;
if MRO(Count>3,4,1)=1 and count=Run then count=1;
newtext=text_new(date,time,H,numtostr(count,0));
text_setstyle(newtext,2,1);
If GetBackGroundColor=Tool_White then Value4=Text_SetColor(newtext,
Tool_Red)
Else Value4=Text_SetColor(newtext, Color); {changes numbers to red for
white charts.}
end
else count=0;
if false then plot1(C,"");
|