
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
Simon,
Here it comes... BAM!
Even better! Hahaha ;)
Thank you.
Why does the order close time represent in such a form (1357306061) ?
Is the reason why the Print() function works because the OrderSelect() function (within the braces) must select the closed order and NOT an open order? This must be done within the braces right? ;) Tricky, tricky.
How can you ask such a question ? what does OrderCloseTime() return ? from the Documentation . . . "datetime OrderCloseTime( )" what is a dateetime ? from the Documentation . . . "The value represents the amount of seconds elapse from 00:00 Jan 1, 1970."
It's time for you to start reading the Documentation . . .
Simon,
Fixed, so it works as intended.
Lines 2 and 3.
Your fix is an improvement . . .
If "Lines 2 & 3" is your answer to my question then you need to look again because it is wrong . . . if you think it is correct please explain why it is correct.
Simon,
Think before you code . . . how many orders do you have in the History pool ? how do you know i is the correct one ?
I could ask you the same question Simon ;)
How do you know the 'ClosedTicketNumber' variable (OrderTicket();) will select the correct ticket (I expect your response to be similar to my own) ?
I know-
will select the correct ticket AND ;) the-
Print(OrderCloseTime());
will print the correct order ticket because the 'while' cycle found the correct ticket to begin with before the program arrived at this section within braces.
Thank you.
Simon,
Your fix is an improvement . . .
Savoring this very rare moment when "Simon says" - "There might possibly be a very slim, glimmering ray of hope for your coding future." Hahaha ;)
If "Lines 2 & 3" is your answer to my question then you need to look again because it is wrong . . . if you think it is correct please explain why it is correct.
Aah, yeah, yeah. Workin' on it. ;)
Thank you.
I could ask you the same question Simon ;)
How do you know the 'ClosedTicketNumber' variable (OrderTicket();) will select the correct ticket (I expect your response to be similar to my own) ?
I know-
will select the correct ticket AND ;) the-
will print the correct order ticket because the 'while' cycle found the correct ticket to begin with before the program arrived at this section within braces.
My code works because . . . well you should know why it works because you should have read it and figured out what it does and why it works . . . but you haven't so you have to ask "why" and this is why you are not learning anything.
My code works because before the Order is closed . . . it's Ticket number (Ticket numbers are unique regardless of the pool ! ! ) is stored in a variable, ClosedTicketNum . . . the Order is then closed and moved to the History pool, then the ClosedTicketNum variable is used to select the correct Order and finally OrderCloseTime() is now looking at the correct Order . . . not some unknown Order in the History pool based on an index number from the Order pool . . .
I know-
will select the correct ticket AND ;) the-
will print the correct order ticket because the 'while' cycle found the correct ticket to begin with before the program arrived at this section within braces.
Simon,
"Your variable i is an index in the Order Pool . . . NOT the History pool . . ."
OrderSelect() Documentation does not state its limit number of orders which can be held in the history pool (you wrote something along the lines of a hundred orders). OrderSelect() Documentation does not state this as far as I have read.
I could possibly have assigned zeros to all history pool orders once one hundred orders had been filled by values other than default. However, I believe in this case your way of saving the order ticket number to a variable seems just fine. I assumed values automatically reset once orders history reached its limit of an apparent limit of one hundred.
Thank you.
Simon,
"Your variable i is an index in the Order Pool . . . NOT the History pool . . ."
OrderSelect() Documentation does not state its limit number of orders which can be held in history (you wrote something along the lines of a hundred orders). OrderSelect() Documentation does not state this as far as I can see.
I could possibly have assigned zeros to all history pool orders once one hundred orders had been filled by values other than default. However, I believe in this case your way of saving the order ticket number to a variable seems just fine. I assumed values automatically reset once orders history reached its limit of an apparent limit of one hundred.
I could possibly have assigned zeros to all history pool orders once one hundred orders had been filled by values other than default.