Check out the MetaTrader for Python Documentation section. Especially this:
Get the number of open positions | |
Get open positions with the ability to filter by symbol or ticket |
- www.mql5.com
Check out the MetaTrader for Python Documentation section. Especially this:
Get the number of open positions | |
Get open positions with the ability to filter by symbol or ticket |
I tried this, but don't know how to get data from positions get.
The idea was if x==open position ( the open price for a position from position get() ), the request wouldn't be sent , and that would resolve my problem, but don't know how to do it.
I tried this, but don't know how to get data from positions get.
The idea was if x==open position ( the open price for a position from position get() ), the request wouldn't be sent , and that would resolve my problem, but don't know how to do it.
You need to learn MQL5 first. MQL5 is a terminal language. This is the basis, the foundation. Only those who know MQL5 can work with MQL5+Python.
If you don't know the basics, no Python will help you.
Maybe later, but now I need smb who know it already to resolve my problem. To get data from position_get(), the price open.
(TradePosition(ticket=1099780544, time=1653942214, time_msc=1653942214521, time_update=1653942214, time_update_msc=1653942214521, type=0, magic=0, reason=0, volume=0.01, price_open=1.07839, sl=0.0, tp=0.0, price_current=1.07831, swap=0.0, profit=-0.08, symbol='EURUSD', comment='', external_id=''),)
Maybe later, but now I need smb who know it already to resolve my problem. To get data from position_get(), the price open.
(TradePosition(ticket=1099780544, time=1653942214, time_msc=1653942214521, time_update=1653942214, time_update_msc=1653942214521, type=0, magic=0, reason=0, volume=0.01, price_open=1.07839 , sl=0.0, tp=0.0, price_current=1.07831, swap=0.0, profit=-0.08, symbol='EURUSD', comment='', external_id=''),)
You need to read and study the documentation: MetaTrader for Python .
- www.mql5.com
- www.mql5.com
Thank you, but how can I take the open_position data. To define it.
With position_get i get the data, but from that data i want to use only open_position. So I can use it with other variables. To select it so the program know what it is.
So I can write if x==open_position don't trade.
Thank you, but how can I take the open_position data. To define it.
With position_get i get the data, but from that data i want to use only open_position. So I can use it with other variables. To select it so the program know what it is.
So I can write if x==open_position don't trade.
Thank you, but how can I take the open_position data. To define it.
With position_get i get the data, but from that data i want to use only open_position. So I can use it with other variables. To select it so the program know what it is.
So I can write if x==open_position don't trade.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I'm trying to automate trade Eurusd but I can't figure out how to limit order requests.
When the program recognize "price in y", it buys as much as possible but i would like that it buys just once.
Here is the code