help for tick comparison

 

hello,

i am an early beginner of MQl4 and i d like to create a function that can compare a new tick to the previous one.

For example it will return true if : new tick>previous tick. i guess i must use the refreshrate function but i can t figure out how>

thank in advance

 
logan113 wrote >>

hello,

i am an early beginner of MQl4 and i d like to create a function that can compare a new tick to the previous one.

For example it will return true if : new tick>previous tick. i guess i must use the refreshrate function but i can t figure out how>

thank in advance

hi! I think i made it on my own indeed it was not so difficult :

bool tick_comparison()
{
for(int j=0;j<=1000;j++)
{
double previous_tick_on_ask=Ask;
while (RefreshRates()==false)
{
if(Ask>previous_tick_on_ask)
return(true);
}
}
}

See Y@