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
The Comez code has problem with the classification there. It only does buy operation outside trained period. Tried to debug whole day, and still not get the real problem solved.
From the russian forum here, get the modified PNN eric code. it uses the parzen window classification. The results is so so from backtest.
As for any Parzen window classificator, your will have the sigma problem, what value for the sigma is best for current priod? I optimized it, and get the result 0.03 for EURUSD M15.
Link here is from codebase, he is using MACD and IMA matrix to calculate the Euclidian distance between trained vector and the test vector, good think so, need to be inproved. He is not using the parzen window classificator, but that just one step away.
What he is doing is he has a function that calcuate euclidean matric. So now we can go back to develope the PNNeric.mq4 above, to handle a matrix with iMA. Am I on the right track?
{
int i=0,i1=0,i3,i2,i4;
double Metric[1];
double t,sum;
ArrayResize(Metric,num_v);
ArrayInitialize(Metric,0.0);
for(i=0;i<num_v;i++)
{
for(i1=0;i1<v_dim_x-1;i1++)Metric+=MathPow(X_Data_Base-Vector,2);
Metric=MathSqrt(Metric);
}
//sort by ASCEND Metric
for(i3=0;i3<num_v-1;i3++)
for(i2=i3+1;i2<num_v;i2++)
if(Metric>Metric)
{
t=Metric;
Metric=Metric;
Metric=t;
for(i4=0;i4<v_dim_x;i4++)
{
t=X_Data_Base;
X_Data_Base=X_Data_Base;
X_Data_Base=t;
}
}
sum=0;
for(i=0;i<Num_neighbour;i++)
{
sum+=X_Data_Base[5];
//Print(X_Data_Base[5]);
}
return(sum/Num_neighbour);
}I found attached powerpoint presenation helped me understand more about parzen window classification.
attached is the parzen window classification functions for matlab
Barnix,
İs it possible for you to combine Wavelet with KalmanGain: https://www.mql5.com/en/forum/176348/page4
Print Matrix elements script example
Normalize Matrix Columns (Script Example)
Normalize sample and test Matrices Columns (Script Example)
smple ATTRIBUTES --> sample MATRIX
test ATTRIBUTES --> test MATRIX