I think you have to delete the info in the array everytime a new tick is created(freememory), when you are using copyticks they only copy the number that you have put into the array at time 0. Newest tick will not be created...
Example;
MqlTick ticks[]; int copied=CopyTicks(NULL,ticks,COPY_TICKS_TRADE,0,10); // You will only get 10 lastest ticks at time 0. When time is 1, it will generate an amount of new tick. right? This function will stand at same place. I think you have to refresh it, freememory and make a new copy then for every new tick. Then you can compare current tick.
MqlTick ticks[];
int copied=CopyTicks(NULL,ticks,COPY_TICKS_TRADE,0,10);
"Your function... make comparison with current tick";
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I think you have to delete the info in the array everytime a new tick is created(freememory), when you are using copyticks they only copy the number that you have put into the array at time 0. Newest tick will not be created...
Example;
MqlTick ticks[];
int copied=CopyTicks(NULL,ticks,COPY_TICKS_TRADE,0,10); // You will only get 10 lastest ticks at time 0. When time is 1, it will generate an amount of new tick. right? This function will stand at same place. I think you have to refresh it, freememory and make a new copy then for every new tick. Then you can compare current tick.
MqlTick ticks[];
int copied=CopyTicks(NULL,ticks,COPY_TICKS_TRADE,0,10);
"Your function... make comparison with current tick";
ArrayFree(ticks); // void ArrayFree( void& array[] // array );
Hi, so what is your solution? Thanks in advance. :)
Hi, so what is your solution? Thanks in advance. :)
Don't quote yourself, edit your post.