You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey man me again, Ill try to be quick. im having issues connecting and using strategy... i did somedigging but im not that knowledgeable to figure out whats wrong and how to fix. ive tried the aiomql.json file in same folder as main and that doesnt work... below i force login into the account with same credentials as mt5 lib directly twice. please help. mt5 login fin your framework doesnt with the same cred pulled from env...
`from aiomql import *
import MetaTrader5 as mt5
import asyncio
import pandas as pd
import os
from dotenv import load_dotenv
load_dotenv() # This will load environment variables from the .env file
password = os.getenv('password')
login = os.getenv('login')
server = os.getenv('server')
Hey man me again, Ill try to be quick. im having issues connecting and using strategy... i did somedigging but im not that knowledgeable to figure out whats wrong and how to fix. ive tried the aiomql.json file in same folder as main and that doesnt work... below i force login into the account with same credentials as mt5 lib directly twice. please help. mt5 login fin your framework doesnt with the same cred pulled from env...
`from aiomql import *
import MetaTrader5 as mt5
import asyncio
import pandas as pd
import os
from dotenv import load_dotenv
authorized = mt5.login(login=os.getenv('login'), password=os.getenv('password'), server=os.getenv('server'))
load_dotenv() # This will load environment variables from the .env file
password = os.getenv('password')
login = os.getenv('login')
server = os.getenv('server')
instances
bot = Bot()
acc = Account()
config = Config()
mt5.initialize()
mt5.login(login=login, password=password, server=server)
print(mt5.terminal_info())
print(mt5.version())
acc.login = os.getenv('login')
acc.password = os.getenv('password')
acc.server = os.getenv('server')
async def main():
acc = Account() # Initialize the Account instance
# populate acc by env file
acc.login = os.getenv('login')
acc.password = os.getenv('password')
acc.server = os.getenv('server')
# await acc.connected()
# print("Connected to account:", acc.connected)
# await acc.refresh()
Run the async function
asyncio.run(main())`
The text was updated successfully, but these errors were encountered: