
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
If you sleep you MUST RefreshData()
actully on my metatrader the EA updates correctly the values every second..
Thanks! It work as a stand alone but not with other codes
I think I have problem with the looping. The Sleep function has to be in the same loop and so on....
It cannot work with other code and I cannot access to value[]?
Must the codes be within the start() function?
Is it possible to make this into a function that returns values[]? So that I could use compare any from value[0] to value[59]?
Thanks! It work as a stand alone but not with other codes
I think I have problem with the looping. The Sleep function has to be in the same loop and so on....
It cannot work with other code and I cannot access to value[]?
Must the codes be within the start() function?
Is it possible to make this into a function that returns values[]? So that I could use compare any from value[0] to value[59]?
It is not possible if you want use a loop and you want to be shure that every second is logged.
i in your position would put my EA code inside this loop. Please notice that you can access the variables only when ArrayIsReady==true;
Is there another way around this. I cannot have the whole start() function to sleep every 1 second
Can this be done by using the date and time function.
I was thinking like during every start(), take sample of the last 60sec in 1 second interval. (Assuming that all predefined variables' values historic data include some kind of time value - correct me if they don't)
i.e. (the date and time now is Dec 18, 2010 @ 12:30:27')
price at time[0] - (price at time current), which is 12:30:27'
price at time[1] - (price at time current minus 1 second), which is 12:30:26'
price at time[3] - (price at time current minus 2 second), which is 12:30:25'
and so on ...