I have an efs below. This efs is going to be on 1 min charts, however I want to make this part of efs make it's calculation every five min. Then I want to have other part to calculate once ever on min. Is there way to do this? I'm doing this because this efs takes too much time.
Thanks
function preMain() {
setPriceStudy(true);
setStudyTitle("ADX Test II");
setCursorLabelName("ADX Test II");
setColorPriceBars(true);
setDefaultPriceBarColor(Color.blue);
setComputeOnClose();
}
function main() {
Symbol = getSymbol();
Interval = 5;
var vSymbol = Symbol+","+Interval;
hADX = adx(14,14,sym(vSymbol));
hPDI = pdi(14,14,sym(vSymbol));
hNDI = ndi(14,14,sym(vSymbol));
if (
hPDI > hNDI &&
hPDI > hADX
) {
setPriceBarColor(Color.lime);
}
}[COLOR=darkblue]
Thanks
function preMain() {
setPriceStudy(true);
setStudyTitle("ADX Test II");
setCursorLabelName("ADX Test II");
setColorPriceBars(true);
setDefaultPriceBarColor(Color.blue);
setComputeOnClose();
}
function main() {
Symbol = getSymbol();
Interval = 5;
var vSymbol = Symbol+","+Interval;
hADX = adx(14,14,sym(vSymbol));
hPDI = pdi(14,14,sym(vSymbol));
hNDI = ndi(14,14,sym(vSymbol));
if (
hPDI > hNDI &&
hPDI > hADX
) {
setPriceBarColor(Color.lime);
}
}[COLOR=darkblue]
Comment