Im trying to backtest a linear regression strategy on MT5/MQL5.
I can create an OBJ_REGRESSION and return values ObjectGetValueByTime but unfortunately it doesnt work on backtest. I read objects dont get created in strategy tester?
ObjectCreate("xx",OBJ_REGRESSION,0, Time[finalBar],0,Time[initialBar],0);
Comment(ObjectGetValueByTime(0,"xx" ,Time[0],0)+" "+ObjectGetValueByTime(0,"xx",T ime[0],1)+" "+ObjectGetValueByTime(0,"xx",T ime[0],2));
Anyone have a function I can use in an EA that does the same as ObjectCreate - OBJ_REGRESSION ?
I know the math is out there but Im just not that good to code it.
I can create an OBJ_REGRESSION and return values ObjectGetValueByTime but unfortunately it doesnt work on backtest. I read objects dont get created in strategy tester?
ObjectCreate("xx",OBJ_REGRESSION,0, Time[finalBar],0,Time[initialBar],0);
Comment(ObjectGetValueByTime(0,"xx" ,Time[0],0)+" "+ObjectGetValueByTime(0,"xx",T ime[0],1)+" "+ObjectGetValueByTime(0,"xx",T ime[0],2));
Anyone have a function I can use in an EA that does the same as ObjectCreate - OBJ_REGRESSION ?
I know the math is out there but Im just not that good to code it.