Drummond PLDot

Have a QScript to share, or need help with programming? Post your comment here.
Post Reply
RJJ
Posts: 2
Joined: Tue Jul 21, 2015 9:24 pm
Contact:

Drummond PLDot

Post by RJJ » Sun Dec 18, 2016 3:36 pm

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) ;

gezza
Posts: 17
Joined: Wed Jul 22, 2015 1:46 am
Contact:

Re: Drummond PLDot

Post by gezza » Sun Dec 18, 2016 9:48 pm

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

RJJ
Posts: 2
Joined: Tue Jul 21, 2015 9:24 pm
Contact:

Re: Drummond PLDot

Post by RJJ » Tue Dec 20, 2016 6:00 pm

Thanks for your help Gezza

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests