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
Declinations Script Error
Re: Declinations Script Error
Looking at this now. I noticed in your function on the mars line, you are missing a comma. That is the cause of the invalid number of arguments error.
Looking at the indicator now...
Looking at the indicator now...
Re: Declinations Script Error
Looked at the indicator. Didn't test it. But was able to make it compile. You mainly just had minor typos in the code. Here is the cleaned up version:
Code: Select all
input:ahead(60),color(blue),thickness(1),show_midline(true),show_middots(true),midptcolor(red),midstyle(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],midptcolor);
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];
}
}
Re: Declinations Script Error
Thanks, that one comma corrected it.
Who is online
Users browsing this forum: No registered users and 61 guests