Page 1 of 1

Custom Indicator

Posted: Mon Apr 09, 2018 12:02 am
by dwedding
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;

Re: Custom Indicator

Posted: Mon Apr 09, 2018 12:37 pm
by sbank
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;