Declinations Script Error
Posted: Thu Dec 30, 2021 3:50 pm
I'm getting two errors in each:
I've retyped an half dozen time still error.
On the Indicator, I'm getting an error on line 8 "declinatiosystem" unknown function and illegal math expression.
input:ahead(60),color(blue),thickness(1),show_midline(true),
show_middots(true),midptcolor(red),midstyles(ps_dot),
midline_thick(1);
if(barnum==barsback){
lastlo,lasthi=-1;
lastmidbar=-1;lastmidprice=0;
}
df=DeclinationSystem(ahead);
plot1[-ahead]=df;
color1[-ahead]=color;
thickness1[-ahead]=thickness;
if((df[1]<df[2])and(df[1]<df)){
lastlo=barnum-1;
loval=df[1];
if(lasthi>0){
back=(lastlo-lasthi)*0.5;
offset=barnum_to_offset(barnum-(back+1)+ahead);
if(show_middots==true)plot_dot(barnum-
(back+1)+ahead,df[offset+ahead],color,3+thickness);
if((show_midline==true)and(lastmidbar!=-1)){
ref1=trendline(lastmidbar,lastmidprice,barnum-
(back+1)+ahead,df[offset+ahead],midpcolor);
set_tl_style(ref1,midstyle);
set_tl-size(ref1,midline_thick);
}
lastmidbar=barnum-(back+1)+ahead;
lastmidprice=df[offset+ahead];
}
}
if((df[1]>df[2])and(df[1]>df)){
lasthi=barnum-1;
hival=df[1];
if(lastlo>0){
back=(lasthi-lastlo)*0.5;
offset=barnum_to_offset(barnum-(back+1)+ahead);
if(show_middots==true)plot_dot(barnum-
(back+1)+ahead,df[offset+ahead],color,3+thickness);
if((show_midline==true)and(lastmidbar!=-1)){
ref1=trendline(lastmidbar,lastmidprice,barnum-
(back+1)+ahead,df[offset+ahead],midptcolor);
set_tl_style(ref1,midstyle);
set_tl_size(ref1,midline_thick);
}
lastmidbar=barnum-(back+1)+ahead;
lastmidprice=df[offset+ahead];
}
}
On the Function. I'm getting:
Too few parameters in astro_declination Line 8 also illegal math expression.
input:ahead;
merc=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_mercury,false);
ven=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_venus,false);
sun=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_sun,false);
mars=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead]astro_mars,false);
jupiter=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_jupiter,false);
saturn=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_saturn,false);
total=merc*6+ven*5+sun*4+mars*3+jupiter*2+saturn;
return total;
Thanks for looking
Mark
I've retyped an half dozen time still error.
On the Indicator, I'm getting an error on line 8 "declinatiosystem" unknown function and illegal math expression.
input:ahead(60),color(blue),thickness(1),show_midline(true),
show_middots(true),midptcolor(red),midstyles(ps_dot),
midline_thick(1);
if(barnum==barsback){
lastlo,lasthi=-1;
lastmidbar=-1;lastmidprice=0;
}
df=DeclinationSystem(ahead);
plot1[-ahead]=df;
color1[-ahead]=color;
thickness1[-ahead]=thickness;
if((df[1]<df[2])and(df[1]<df)){
lastlo=barnum-1;
loval=df[1];
if(lasthi>0){
back=(lastlo-lasthi)*0.5;
offset=barnum_to_offset(barnum-(back+1)+ahead);
if(show_middots==true)plot_dot(barnum-
(back+1)+ahead,df[offset+ahead],color,3+thickness);
if((show_midline==true)and(lastmidbar!=-1)){
ref1=trendline(lastmidbar,lastmidprice,barnum-
(back+1)+ahead,df[offset+ahead],midpcolor);
set_tl_style(ref1,midstyle);
set_tl-size(ref1,midline_thick);
}
lastmidbar=barnum-(back+1)+ahead;
lastmidprice=df[offset+ahead];
}
}
if((df[1]>df[2])and(df[1]>df)){
lasthi=barnum-1;
hival=df[1];
if(lastlo>0){
back=(lasthi-lastlo)*0.5;
offset=barnum_to_offset(barnum-(back+1)+ahead);
if(show_middots==true)plot_dot(barnum-
(back+1)+ahead,df[offset+ahead],color,3+thickness);
if((show_midline==true)and(lastmidbar!=-1)){
ref1=trendline(lastmidbar,lastmidprice,barnum-
(back+1)+ahead,df[offset+ahead],midptcolor);
set_tl_style(ref1,midstyle);
set_tl_size(ref1,midline_thick);
}
lastmidbar=barnum-(back+1)+ahead;
lastmidprice=df[offset+ahead];
}
}
On the Function. I'm getting:
Too few parameters in astro_declination Line 8 also illegal math expression.
input:ahead;
merc=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_mercury,false);
ven=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_venus,false);
sun=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_sun,false);
mars=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead]astro_mars,false);
jupiter=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_jupiter,false);
saturn=astro_declination(year[-ahead],month[-ahead],
day[-ahead],time[-ahead],astro_saturn,false);
total=merc*6+ven*5+sun*4+mars*3+jupiter*2+saturn;
return total;
Thanks for looking
Mark