Hi,
I have the following in an efs script:
if (getBarState() == BARSTATE_ALLBARS) {
resetVars();
}
if(!bInit) {
trailUp = efsExternal("\\PFormulas\\Trail_Up_v1.00.efs", "e", "e",
ps, 0.30, 2, 6, 0, Tick);
tU_p_series = getSeries(trailUp, 0);
tU_series = getSeries(trailUp, 1);
trailDwn = efsExternal("\\PFormulas\\Trail_Down_v1.00.efs", "e", "e",
ps, 0.30, 2, 6, 0, Tick);
tD_p_series = getSeries(trailDwn, 0);
tD_series = getSeries(trailDwn, 1);
testLong = efsExternal("\\PFormulas\\BackTesting\\Patterns\\c 2_Buy_v1.06b.efs", ps, Tick, 1);
nL_id_series = getSeries(testLong, 0);
nL_series = getSeries(testLong, 1);
nL_stp_series = getSeries(testLong, 2);
testShort = efsExternal("\\PFormulas\\BackTesting\\Patterns\\c 2_Sell_v1.06b.efs", ps, Tick, 1);
nS_id_series = getSeries(testShort, 0);
nS_series = getSeries(testShort, 1);
nS_stp_series = getSeries(testShort, 2);
bInit = true;
}
For some reason the series will not initialize properly. Obviously I am not resetting the global variables correctly but the resetting seems to be OK. I have searched the forums but have never seen anyone use more than one efsExternal inside bInit and so I'd like to ask, if anyone knows, how does one initialize multiple efsExternal inside the bInit code block? If I comment out all but one of the efsExternals in the above, the code initializes and runs properly.
Thank you in advance for any help anyone might be able to offer.
Regards,
Jane
I have the following in an efs script:
if (getBarState() == BARSTATE_ALLBARS) {
resetVars();
}
if(!bInit) {
trailUp = efsExternal("\\PFormulas\\Trail_Up_v1.00.efs", "e", "e",
ps, 0.30, 2, 6, 0, Tick);
tU_p_series = getSeries(trailUp, 0);
tU_series = getSeries(trailUp, 1);
trailDwn = efsExternal("\\PFormulas\\Trail_Down_v1.00.efs", "e", "e",
ps, 0.30, 2, 6, 0, Tick);
tD_p_series = getSeries(trailDwn, 0);
tD_series = getSeries(trailDwn, 1);
testLong = efsExternal("\\PFormulas\\BackTesting\\Patterns\\c 2_Buy_v1.06b.efs", ps, Tick, 1);
nL_id_series = getSeries(testLong, 0);
nL_series = getSeries(testLong, 1);
nL_stp_series = getSeries(testLong, 2);
testShort = efsExternal("\\PFormulas\\BackTesting\\Patterns\\c 2_Sell_v1.06b.efs", ps, Tick, 1);
nS_id_series = getSeries(testShort, 0);
nS_series = getSeries(testShort, 1);
nS_stp_series = getSeries(testShort, 2);
bInit = true;
}
For some reason the series will not initialize properly. Obviously I am not resetting the global variables correctly but the resetting seems to be OK. I have searched the forums but have never seen anyone use more than one efsExternal inside bInit and so I'd like to ask, if anyone knows, how does one initialize multiple efsExternal inside the bInit code block? If I comment out all but one of the efsExternals in the above, the code initializes and runs properly.
Thank you in advance for any help anyone might be able to offer.
Regards,
Jane
Comment