Hello All,
I've noticed that when I run a backtest/optimization with IQFeed Data my PC takes considerably longer on daily data (1000 bars loaded - 3 years of data) than it does with norgate's database of the same settings. I'm having trouble understanding why it takes so much longer with IQfeed to run optimization and backtests compared to norgate. I suspect it could be because of the realtime feed that also somehow interferes with the AFL formula when trying to optimize. `maxpos = 10; // maximum number of open positions
SetOption("InitialEquity", 100000 ); // set initial equity = 100K
SetOption( "MaxOpenPositions", maxpos );
SetPositionSize( 10 / maxpos, spsPercentOfEquity );
ShortMA = Optimize("ShortMA", 9, 1, 100, 1);
LongMA = Optimize("LongMA", 21, 5, 100, 1);
FastMA = EMA(C, shortMA);
SlowMA = EMA(C, longMA);
FilterMA = EMA(C, 200);
Buy = Cross(FastMA, slowMA);
Sell = 0;
SellPrice = Close;
ApplyStop( stopTypeProfit,stopModePercent,10, ExitAtStop = 0, volatile = False, ReentryDelay = 0, ValidFrom = 0, ValidTo = -1);
ApplyStop( stopTypeLoss, stopModePercent, 1, ExitAtStop = 0, volatile = False, ReentryDelay = 0, ValidFrom = 0, ValidTo = -1);
Plot(FastMA,"shortMA", colorGreen, styleLine, 0, 0, 0, 0);
Plot(SlowMA, "SLow", colorBlue, styleLine, 0, 0, 0, 0);
Plot(FilterMA, "200", colorRed, styleLine, 0, 0, 0, 0);`
This is the code I am using.