
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I'm using the class CTradeStatistics to get some specific statistics about the trades, but, in certain moment I got the error "zero divide in 'ctradestatistics.mqh'".
Investigating the situation, I discovered in the code:
{
if(m_balance_data.At(i)!=0.0)
{
HPR[i-1]=m_balance_data.At(i)/m_balance_data.At(i-1);
m_ahpr+=HPR[i-1];
}
}
that, the "m_balance_data.At(i-1)" could be zero, eventually.
So, I changed to:
{
if(m_balance_data.At(i)!=0.0)
{
if(m_balance_data.At(i-1)==0){
HPR[i-1]=1;
}
else{
HPR[i-1]=m_balance_data.At(i)/m_balance_data.At(i-1);
}
m_ahpr+=HPR[i-1];
}
}
Is correct to assume that when the balance is 0, the HPR is equal to 1?
Thanks in advance.
Thanks for great work.can you add calculate correlation(profit,MFE) , correlation(profit,MAE) ,correlation(MFE,MAE) in Class?
A quicker way to get the Z-score percent. No looping.
This adds several more entries to the Laplas multidimensional array, i.e. entries 3.02 to 3.70.
I only had access to 4 digits of precision.