MetaTrader 5 Python User Group - the summary - page 18

SungSungE
567
SungSungE  
.. WoW .. I find this page today. But 17 Pages , If possible make a FAQ for user >< 
fbrand
20
fbrand  

Is it possible for anybody just to post a very basic py script ie. that uses either two MA's for buy and close signals and how to use SL and TP, and then hopefully it will also clear up how to go about using the ticks now as a TimeFrame

I've been trying to piece all the threads in both forums together and from what I can get in the docs, but after reading most posts of Nicholi and the rest I get a bit intimidated and it doesn't look that straight forward.

I think this will really help myself and many others also just to get a basic footing to start from and then start building and learning the more complicated aspects from there.

Really appreciate the work you guys are doing.

mhdumer016
23
mhdumer016  
nicholi shen:

It can launch (open) the terminal if you targeted it with the path arg because the (subprocess) command is the same, but it cannot connect to the terminal.

you are right , had to take a break but i just check it now and , yep , all it does is open the mt4 terminal and do not login the account , i was getting confused between the logging into mt5 and mt4 ..... it would have been awesome if it worked with mt4 , but i guess metaquotes werent kidding when they were saying they are ending the support for mt4 ......

any how i guess all i can do now is to test things on mt5 ...

A question tho , is it possible to get the account number only from the metatrader logged in account?
i tried the "   mt5.account_info()  " but i guess it prints all of the information from the account , but i only need the account number , to compare it with a variable which also has another account number , so is it possible to get only the laccount number of logged in account?

mhdumer016
23
mhdumer016  

pardon my ignorance , but isnt it for printing all the account information , rather then just the account number ?

fbrand
20
fbrand  


Why is the following happening?

MetaTrader5 package author: MetaQuotes Software Corp. MetaTrader5 package version: 5.0.31

symbol = "EURUSD"
sym_info_1 = mt5.symbol_info("EURUSD")
sym_info_2 = mt5.symbol_info(symbol)
print(sym_info_1)
print(sym_info_2)

Outputs:

None

None



fbrand
20
fbrand  
fbrand:


Why is the following happening?

MetaTrader5 package author: MetaQuotes Software Corp. MetaTrader5 package version: 5.0.31

Outputs:

None

None



Nevermind, it was an issue with my Initialize.
nicholish en
2758
nicholish en  
mhdumer016:

pardon my ignorance , but isnt it for printing all the account information , rather then just the account number ?

It returns a namedtuple. If you don't know how to access it's properties then you'll need to study up a bit more on how python objects work.

Sergey Golubev
Moderator
122449
Sergey Golubev  
nicholish en
2758
nicholish en  
Sergey Golubev:

Where is the changelog?