Custom Indicator

Have a QScript to share, or need help with programming? Post your comment here.
Post Reply
dwedding
Posts: 45
Joined: Wed Jul 05, 2017 8:00 pm
Contact:

Custom Indicator

Post by dwedding » Mon Apr 09, 2018 12:02 am

My first attempt at QScript with no errors, but it doesn't plot correctly. Also I would like to assign separate colors to each plot and I haven't found a way to do that. Can someone help me with this? Thanks.

Code: Select all

input: color(red),thickness(1),displace(0);

plot34H[-1*displace]=xaverage(high,34);
color34H[-1*displace]=color;
thickness34H[-1*displace]=thickness;                                               
                                                                               
plot34L[-1*displace]=xaverage(low,34);
color34L[-1*displace]=color;
thickness34L[-1*displace]=thickness;

plot34C[-1*displace]=xaverage(close,34);
color34C[-1*displace]=color;
thickness34C[-1*displace]=thickness;

plot12[-1*displace]=xaverage(close,12);
color12[-1*displace]=color;
thickness12[-1*displace]=thickness;
                              
plot144[-1*displace]=xaverage(close,144);
color144[-1*displace]=color;
thickness144[-1*displace]=thickness;

plot169[-1*displace]=xaverage(close,169);
color169[-1*displace]=color;
thickness169[-1*displace]=thickness;

sbank
Posts: 174
Joined: Tue Jul 21, 2015 9:35 pm
Contact:

Re: Custom Indicator

Post by sbank » Mon Apr 09, 2018 12:37 pm

The plot and color (and style and thickness) needs to be in a set format. Wave59 is looking for plot1, plot2, plot3, etc. And they are used in conjunction with color1, color2, color3. (style1, style2, style3, as well.)

So as an example, you can change your code to be something like this:

Code: Select all

plot1[-1*displace]=xaverage(high,34);
color1[-1*displace]=color;
thickness1[-1*displace]=thickness;

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests