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
Hi Dmitriy
This error is occurring when i try to compile the EA code
cannot convert type 'bool' to type 'matrix' pca.mqh 241 13
this error points here:
bool CPCA::Study(matrix &data)
{
matrix X;
ulong total = data.Rows();
if(!X.Init(total, data.Cols()))
return false;
v_Means = data.Mean(0);
v_STDs = data.Std(0) + 1e-8;
for(ulong i = 0; i < total; i++)
{
vector temp = data.Row(i) - v_Means;
temp /= v_STDs;
X = X.Row(temp, i); <<<<<<<<<<<<<<<<<<<<<<<< Line with error
}
Thanks for help
Rogerio
Hi Dmitriy
This error is occurring when i try to compile the EA code
cannot convert type 'bool' to type 'matrix' pca.mqh 241 13
this error points here:
bool CPCA::Study(matrix &data)
{
matrix X;
ulong total = data.Rows();
if(!X.Init(total, data.Cols()))
return false;
v_Means = data.Mean(0);
v_STDs = data.Std(0) + 1e-8;
for(ulong i = 0; i < total; i++)
{
vector temp = data.Row(i) - v_Means;
temp /= v_STDs;
X = X.Row(temp, i); <<<<<<<<<<<<<<<<<<<<<<<< Line with error
}
Thanks for help
Rogerio
Hello Rogerio.
Replace X = X.Row(temp, i); to
when compiling it generates 2 errors. code fragment
p217 for(ulong r=0; r<total; r++)
218 {
219 vector temp = data.Row(r)- v_Means;
220 temp / = v_STDs;
221 result=result.Row(temp,r);
compilation error at line 221 - cannot convert type 'bool' to type 'matrix'
line 241 X = X.Row(temp,i); same error
How to fix it? Can anyone hint? I think I need to look at the code a bit higher, but I don't have enough knowledge to figure it out.
I'm still an expert!
line 241 X = X.Row(temp,i); same error
How to fix it? Can anyone hint? I think you should look at the code above, but I don't have enough knowledge to figure it out.
I'm still an expert!
You don't need to assign. In current builds, the vector is written directly to the matrix, and the logical result of the operation is returned.
DMITRY!!! congratulate you on our national holiday RUSSIA DAY !!!! Health ! Success and good luck in all your endeavours !!! Merry and
happy weekend with family and friends !!!!
Advice ! Should I continue to master the topic : "teaching NS without a teacher" with my hardware.
Processor i7 processor 3.5 ghertz, RAM 8 GB, vidiokarta Nvidio 2060 c 8 GB.
In article 15 everything compiles fine but kmeans advisor does not work.
It writes Create data : 10000 of 10040 and everything stops.
nothing intelligible is written in the log : " execution error 0 ".
in MT5 set 250000 bar in the window
The Expert Advisor was run on real trading "Sberbank" - 6min.
The cycle "training with a teacher" on the same data passed in general asleep, but here I stumbled!