andisu:
I want to compare the price of the EURUSD, for example, with the previous second or minute price. How can I do this?
I try to use a while loop like this, for compare infinite times, but this code is very slowly and as time goes on is even slower :
When I use without a while, the AskAnt and AskAct be equal same time.
How can I do this with a performatic code?
Thank You!
double AskAnt = Ask; double dP = 0.5*Point; double Comp = 0; while(Comp<dP) { Sleep(1000); RefreshRates(); Comp = MathMod(AskAnt - Ask); } // Do Any Y Want
If Y wanna to wait while price will be changed - try this one.
If Y not - just whithout while()
double AskAnt = Ask; double dP = 0.5*Point; Sleep(1000); RefreshRates(); if(MathMod(AskAnt-Ask)>dP) { // DO Any Y want }
Regards.
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
I want to compare the price of the EURUSD, for example, with the previous second or minute price. How can I do this?
I try to use a while loop like this, for compare infinite times, but this code is very slowly and as time goes on is even slower :
When I use without a while, the AskAnt and AskAct be equal same time.
How can I do this with a performatic code?
Thank You!