Any ideas if the following idea can be implemented. I want to define a variable, cpuLoad, to determine if the efs runs on every tick or every new bar.
This code has a lot of stuff wrong and I was wondering how to fix it.
My alternative is to just comment out one or the other getBarState lines.
if(cpuLoad=="Lite"){
if(getBarState()==BARSTATE_NEWBAR&&getCurrentBarIn dex()==0){ //Runs at the start of a new bar, cpu lite
}
else}
if(getBarState()==BARSTATE_CURRENTBAR&&getCurrentB arIndex()==0)){ //Runs on (almost) every tick, cpu heavy
}
This code has a lot of stuff wrong and I was wondering how to fix it.
My alternative is to just comment out one or the other getBarState lines.
if(cpuLoad=="Lite"){
if(getBarState()==BARSTATE_NEWBAR&&getCurrentBarIn dex()==0){ //Runs at the start of a new bar, cpu lite
}
else}
if(getBarState()==BARSTATE_CURRENTBAR&&getCurrentB arIndex()==0)){ //Runs on (almost) every tick, cpu heavy
}
Comment