How do you write code for the alert to trigger signal after the bar closes not during the bar. I wrote this and it alerts during the bar.
close(0) > open(0) &&
high(0) >= high(-1)+.02 &&
close(0) > open(0) &&
high(0) >= high(-1)+.02 &&
if(getBarState()==BARSTATE_NEWBAR){
if(close(-1) > open(-1) && high(-1) >= high(-2)+.02 && ...){
//rest of your code
}
}
Comment