
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
lol alright let me write a script to illustrate what I mean.
ok run this test script. A datetime is really just like an integer value. It is actually a count of seconds since 1970 so it has to be an integer value.
I normalized the part closes count and made it integer in case any of those nasty double rounding errors happens.
I appreciate you illustrating that for me :)
What I am not getting though, is how I am using double partcloses in an equality statement before OrderClose() function, so that the next time the loop is run, it will see in the "if" statement that there is something different, as to not complete the OrderClose() again...
I'm really sorry if I am being a pain in the backside and not getting this, but I just don't see how I am using that in an equality statement to filter continuous closing of OrderClose()...
I dont know what else to tell you....
The GV is just there to hold some data you might need to resume after a restart. It's down to you to decide what data that is, I just gave you an example based on what you posted earlier, but you could do the same thing by naming the GV with the date to associate it with the correct trade and store into it whatever data you need to store for recovery purposes.
What are your usual conditions for not repeatedy part closing each time ? Define what criteria that is and the data it uses that would be lost if mt4 restart happens, store that data in the global variable and extract it from there when mt4 is restarted.
UPDATE: Just to get straight to the point and more concise; why is the print below, showing this and different times....
If you put your comments on a different line, your post wouldn't be so wide and will make it easier to read without scrolling back and forth.
Done - hopefully that makes it easier for you?
UPDATE: Just to get straight to the point and more concise; why is the print below, showing this and different times....
If this is the print
2013.10.25 12:18:28 2001.02.15 20:03 Trend Fishing - V1 - Refined Exits EURUSD,H1: time != FetchDateOfThirdClose = 982224765 != 1000452548
it is related to a different section of code to the code that you have posted
Sorry for wasting your time in helping me with such a stupidly missed area... I have it working now with this: