I set up my MagicNumber with 6 digits because I kept track of the ticket number with the array TicketNumber[MagicNumber]. I couldn't get a number with more than 6 digits into the array.
I used the first 3 digits for the EA# (EA#1=1, EA#2=2,...), the 4th digit for the DayofWeek, the 5th for the time-Session, and the 6th (or right-hand digit) for the Trade# (1=first trade of sess).
The problem with this is that each new week I have a MN that's the same as one from last week. So, either I read in my Account History one week at a time or I move to a 9 digit MN.
The MN can be 9 digits long (correct me it can be longer). So, I could use the first 3 digits (3 left-hand digits) for the EA# and the next 3 digits for the Week# (counting from 1-Jan-2000). This will give me unique MNs. If I read those numbers back from Account History, and cut them down to 6 digits to fit into the TicketNumber[MagicNumber] array, then the MN is no longer unique.
I don't want to re-code my EA any more than neccessary.
Can somebody give me a work-around or a solution or a resolution for this problem?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I used the first 3 digits for the EA# (EA#1=1, EA#2=2,...), the 4th digit for the DayofWeek, the 5th for the time-Session, and the 6th (or right-hand digit) for the Trade# (1=first trade of sess).
The problem with this is that each new week I have a MN that's the same as one from last week. So, either I read in my Account History one week at a time or I move to a 9 digit MN.
The MN can be 9 digits long (correct me it can be longer). So, I could use the first 3 digits (3 left-hand digits) for the EA# and the next 3 digits for the Week# (counting from 1-Jan-2000). This will give me unique MNs. If I read those numbers back from Account History, and cut them down to 6 digits to fit into the TicketNumber[MagicNumber] array, then the MN is no longer unique.
I don't want to re-code my EA any more than neccessary.
Can somebody give me a work-around or a solution or a resolution for this problem?
Thanks.