I am still trying to figure this out. I have looked at the code Brad has sent me and I am still srewing something up. I only want to display the last five shapes in my study to conserve cpu time. I have two functions one for sell and on for buy that my studies call they are as follows
function sell(){
if (getBarState() == BARSTATE_NEWBAR) {
if (varcounter > 5)
varcounter = 0;
else varcounter++
}
DrawShapeRelative(0, high()+.1,Shape.DOWNARROW,"",Color.red,Shape.BOTTO M,+varcounter);
}
my function buy() is the sam thing except i am using a down arrow.
I also defined my var varcounter before the main.
function sell(){
if (getBarState() == BARSTATE_NEWBAR) {
if (varcounter > 5)
varcounter = 0;
else varcounter++
}
DrawShapeRelative(0, high()+.1,Shape.DOWNARROW,"",Color.red,Shape.BOTTO M,+varcounter);
}
my function buy() is the sam thing except i am using a down arrow.
I also defined my var varcounter before the main.
Comment