Ichimoku whith custome Senku Span Shift
-
The problem is likely your EA not the indicator.
-
EAs : Don't do per tick that you can do per bar, or on open.
If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts and you recalculate.)
If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
How to get backtesting faster ? - MT4 - MQL4 programming forum 2017.08.07 -
Indicators: Code it properly so it only recomputes bar zero (after the initial run.)
How to do your lookbacks correctly. 2016.05.11
Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)
-
-
else limit=prev_calculated /*-1*/;
Every tick, after the first, you recalculate the previous bar and the current, thus doubling the load. -
for(int i=fromIndex;i>fromIndex-range && i>=0;i--)
Each tick times each range you subtract the same constant. Optimize:for(int i=fromIndex-(range-1);i>fromIndex && i>=0;i--)
You also check against zero. Unnecessary it you Do your lookbacks correctly #9 - #14 & #19.
Hi guys,I changed the Ichimoku indicator to customize the shift in kumo cloud, and use this as a custom indicator with iCustom function in OnTick function of my expert. the problem is that it makes the EA very slow in the backtest, however, if I use the in built Ichimoku indicator the same way the speed is all good, So do you know what may cause the problem?