current price minus the previous price
against current time minus the previous time
for time you can use TimeCurrent, TimeLocal or GetTickCount
nixtrix:
It can be unreliable as you will miss ticks with some Brokers when price is moving fast . . .
Hello,
I was wondering if it is possible to detect a sudden move in price(lets say 5 pips) in a less than 1second time difference between the previous price.
An Example would be: At 4:10.12 the price was 1.6754 and at 4:10.125 the price is now 1.6759.
If i am unclear please let me know.
Thank you for the replies.
I have another slight problem when trying to calculate the difference between the previous price and the current.
My code so far is:
static double tickCurrent; double tickPrevious = tickCurrent; tickCurrent = Bid; double diff = tickPrevious - tickCurrent; Print("Difference ", diff);
I am getting results such as: Difference -1.000000000006551e-005
Try
Print("Difference ", DoubleToStr(diff,Digits));
GumRai:
Try
Thanks GumRai! worked perfectly.

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
Hello,
I was wondering if it is possible to detect a sudden move in price(lets say 5 pips) in a less than 1second time difference between the previous price.
An Example would be: At 4:10.12 the price was 1.6754 and at 4:10.125 the price is now 1.6759.
If i am unclear please let me know.
Thanks