I'm not sure, but I can give you advice, for example a revised piece of code
double BuyPower = HighestHighRecent-LowestLowOlder; double SellPower = HighestHighOlder -LowestLowRecent; if(BuyPower + Sell Power!=0) // For elements after the division sign that threaten =0 then condition it to ensure that there is no division by 0 { ttf[i] = iT3((BuyPower-SellPower)/(0.5*(BuyPower+SellPower))*100.0,t3Period,t3Hot,t3Original,i,Bars); }
Read the error log (Experts & Journal) it'll tell you line and char. index where it happens!
Learn to use the debugger in case your program does not behave:
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272
- www.metatrader5.com
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Messages Editor
Forum rules and recommendations - General - MQL5 programming forum (2023)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Can anone help me? I keep getting this Zero divide error with this indicator, it will not show u anything. Much appreciated.
Improperly formatted code removed by moderator.