On Windows, normally the " C:\Program Files" directory is protected against writing to it without administrator privileges.
So unless you are running under the administrator role, or have allowed the folders MT1 or MT2 to have user write permissions, you will not be able to run MetaTrader in portable mode on those directories.
Normally, portable mode is used for other root directories and not for standard installation on "Program Files" which usually store data in user's profile path.
On Windows, normally the " C:\Program Files" directory is protected against writing to it without administrator privileges.
So unless you are running under the administrator role, or have allowed the folders MT1 or MT2 to have user write permissions, you will not be able to run MetaTrader in portable mode on those directories.
Normally, portable mode is used for other root directories and not for standard installation on "Program Files" which usually store data in user's profile path.
I Have Already Given The Rights
And Both Terminals Work Good If Run Separetely
Problem comes When I Connect To Both Terminals At The Same Time
Output Of Terminal 1 Before Starting Terminal 2
1753.527
1753.589
1753.527
1753.589
1753.527
1753.589
1753.527
1753.589
1753.527
Output Of Terminal 1 After Starting Terminal 2
1753.39
1753.216
1753.278
'NoneType' object has no attribute '_asdict'
0.0
'NoneType' object has no attribute '_asdict'
0.0
'NoneType' object has no attribute '_asdict'
0.0
1753.39
1753.13
1753.39
1753.13
1753.39
1753.13
1753.38
I personally don't use python, but do remember other posts about users also having difficulties about accessing two terminals at the same time via the python api.
Run a search on the forum, to find those threads and see if they had a solution.
I personally don't use python, but do remember other posts about users also having difficulties about accessing two terminals at the same time via the python api.
Run a search on the forum, to find those threads and see if they had a solution.
i already searched and then came here for a solution
It could be they are transmitting on the same ports and conflicting - that could occur even when using separate Windows accounts.
Some software offers the ability to allow multiple instances to run on the same host by providing the option to customize separate port ranges for each instance, or separate IP addresses, or both - you would have to explore whether MQL5 can do this.
One way you could test this is to create 2 separate windows accounts and use VPN's software to isolate their protocol stacks - it may work if the 2nd instance can use an isolated IP stack.
Alternatively you could try and create 2 separate IP address and see if you can customize the instances to use different ones
It could be they are transmitting the the same ports and conflicting - that could occur even when using separate Windows accounts.
Some software offers the ability to allow multiple instances to run on the same host by providing the option to customize separate port ranges for each instance, or separate IP addresses, or both - you would have to explore whether MQL5 can do this.
One way you could test this is to create 2 separate windows accounts and use VPN's software to isolate their protocol stacks - it may work if the 2nd instance can use an isolated IP stack.
Alternatively you could try and create 2 separate IP address and see if you can customize the instances to use different ones
I did now notice in your message:
'NoneType' object has no attribute '_asdict'
Shared memory conflict?
Again I have worked with software which allows allocation of different memory regions, but as MT may not offer this, you could try a separate virtual machine if they must run on the same host
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I Have Run Python Code On 2 Different Terminals
1st code
path=r'C:\Program Files\MT1\terminal64.exe', portable=True,
2nd code