Get the values of Last and Current tick

 
So I'm totally new to MetaEditor 5 and I've searched for this everywhere but couldn't really understand. All I want to do is to check the value of the last tick and store it in a variable and then store the current tick value on another variable, compare them, decide either to Buy/Sell and reset the variables after the 3rd tick occurs.
 
Aymane Maizi:
So I'm totally new to MetaEditor 5 and I've searched for this everywhere but couldn't really understand. All I want to do is to check the value of the last tick and store it in a variable and then store the current tick value on another variable, compare them, decide either to Buy/Sell and reset the variables after the 3rd tick occurs.

Look for MqlTick in the dokumentation