Save the current tick price in a static/global, when the next tick comes in you have the previous tick price.
May I know the coding to be used?
chuale: May I know the coding to be used?
|
|
Generic code for programming assignment of a value to a variable. (Note, this may or may not work for MQL, check documentation for better examples.)
currentTick=whatever value the program you write sends to it; firstTick=currentTick; programming code here, next tick comes in check value of currentTick against value of firstTick do something here depending on value of firstTick in relation to currentTick (this could be calculate difference between the 2, check to see if it is higher, lower, or equal. it all depends on what you want the program to do with the information

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,
May I know how to write the coding to find the diferrences between the current tick price and previous tick price?
Regards