i have coded the ao change color properly i think. but the problem is, the values remain even after couple of bars making the use of it as signal is still open.
here is the code of AO change color:
if(aogreen11<0 && aogreen10>0) {aobuy=true; aosell=false;}
else if(aored11>0 && aored10<0) {aobuy=false; aosell=true;}
else if(aored11>0 && aogreen10>0) {aobuy=true; aosell=false;}
else if( aogreen11>0 && aored10>0) {aobuy=false; aosell=true;}
else if( aored11<0 && aogreen10<0) {aobuy=true; aosell=false;}
else if( aogreen11<0 && aored10<0) {aobuy=false; aosell=true;}
aogreen11 is the past bar green
aogreen10 is the current bar green
same thing with the red
the problem is attached, calling the values is ok, but remains even after the bar. please help
here is the code of AO change color:
if(aogreen11<0 && aogreen10>0) {aobuy=true; aosell=false;}
else if(aored11>0 && aored10<0) {aobuy=false; aosell=true;}
else if(aored11>0 && aogreen10>0) {aobuy=true; aosell=false;}
else if( aogreen11>0 && aored10>0) {aobuy=false; aosell=true;}
else if( aored11<0 && aogreen10<0) {aobuy=true; aosell=false;}
else if( aogreen11<0 && aored10<0) {aobuy=false; aosell=true;}
aogreen11 is the past bar green
aogreen10 is the current bar green
same thing with the red
the problem is attached, calling the values is ok, but remains even after the bar. please help
Attached Image