Guys
Every time I select "build scrip"t for the following code, it hangs up Wave59 and I have to restart the program.
Any idea what is wrong with the code?
In essence its a 3 Day moving average of H,L,C.
It should print a dot on the current Bar (Bar0)
Thanks in advance for any help...........Ron
#Initialize variables on first bar
if (barnumber==barsback)
{
pldot= 0 ;
hlc_avg= 0 ;
}
[legacycolorvalue = true];
# # PLDot
hlc_avg =( high + low + close ) / 3 ;
pldot = average( hlc_avg, 3 ) ;
plot1=pldot ;
# # PLDotP
hlc_avg =( high + low + close ) / 3 ;
pldot = average( hlc_avg, 3 ) ;
plot1_dot(+1,plot,red,1)=(pldot) ;
Drummond PLDot
Re: Drummond PLDot
Hi Roy
If you wish to draw a line for the Drummond dots, maybe try something like this:
AveB3=(h[3]+l[3]+c[3])/3;
AveB2=(h[2]+l[2]+c[2])/3;
AveB1=(h[1]+l[1]+c[1])/3;
AveB=(AveB3+AveB2+AveB1)/3;
plot1=AveB;
color1=Blue;
thickness1=2;
If you just want the dot, then instead of plot1, use:
plot_dot(barnumber, AveB, Blue, 2);
Cheers
Gezza
If you wish to draw a line for the Drummond dots, maybe try something like this:
AveB3=(h[3]+l[3]+c[3])/3;
AveB2=(h[2]+l[2]+c[2])/3;
AveB1=(h[1]+l[1]+c[1])/3;
AveB=(AveB3+AveB2+AveB1)/3;
plot1=AveB;
color1=Blue;
thickness1=2;
If you just want the dot, then instead of plot1, use:
plot_dot(barnumber, AveB, Blue, 2);
Cheers
Gezza
Re: Drummond PLDot
Thanks for your help Gezza
Who is online
Users browsing this forum: No registered users and 18 guests