I'm attempting to backtest several versions of a custom indicator in one test.
Although it seems to work in backtesting, it gets an error alert in live trading that says "custom indicator must be a string". I know what the error is, and what it means. However, I would like to work around it, so I can still attain the objective of this feature.
I want to be able to test multiple versions of indicators in one backtest by assigning a number to each version of the indi and then test it within the external variables.
Is this a critical error? Will it affect or nullify entry signals based on the indicator? Other EA functions such as order modification are working live.
Has anyone ever worked around this, and does anyone know how I could implement the idea below?
I don't want want to strip this feature if possible.
Although it seems to work in backtesting, it gets an error alert in live trading that says "custom indicator must be a string". I know what the error is, and what it means. However, I would like to work around it, so I can still attain the objective of this feature.
I want to be able to test multiple versions of indicators in one backtest by assigning a number to each version of the indi and then test it within the external variables.
Is this a critical error? Will it affect or nullify entry signals based on the indicator? Other EA functions such as order modification are working live.
Has anyone ever worked around this, and does anyone know how I could implement the idea below?
I don't want want to strip this feature if possible.
Inserted Code
extern int UseIndiVersion = 1; string UseIndi; if (UseIndiVersion == 1) UseIndi = "RRTA"; if (UseIndiVersion == 2) UseIndi = "RRTA2"; if ((EntryFilter == 1) && (OrdersTotal() == 0) && (ChartSymbol() == Trade) && (iCustom(NULL,CTF,UseIndi,period,v,0,SigBar) > 0) && (iCustom(NULL,CTF,UseIndi,period,v,1,SigBar) == 0) && (iCustom(NULL,CTF,UseIndi,period,v,0,SigBar+PrevBar) == 0) && (iCustom(NULL,CTF,UseIndi,period,v,1,SigBar+PrevBar) > 0)) {fBuy1(); Print(TimeToString(TimeCurrent())," ", "UpSigBar=",iCustom(NULL,CTF,UseIndi,period,v,0,SigBar)," ","DnSigBar=",iCustom(NULL,CTF,UseIndi,period,v,1,SigBar));}