Zero Divide Error

 

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. 

Files:
 
Moon Drops: Can anone help me? I keep getting this Zero divide error with this indicator, it will not show u anything. Much appreciated.

 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

Code debugging - Developing programs - MetaEditor Help
  • www.metatrader5.com
MetaEditor has a built-in debugger allowing you to check a program execution step by step (by individual functions). Place breakpoints in the code...