Forum

python support

i cannot access the Python documentation anymore. Was the support for Python dropped? Does anyone have a link

Order expiration time

Hi, this is my code: order_exp = datetime . datetime .now().replace(microsecond = 0 ) + timedelta(minutes = 5 ) order_exp = int (order_exp.timestamp()) order = { 'action': mt5. TRADE_ACTION_PENDING , 'symbol': symbol, 'volume': quantity

307 invalid volume for CADCHF

why I am getting this error at this volume when the maximum volume is 500

Python order filling type and deviation

I have tried different levels of deviations. Now I have it set to 0. I even changed the order filling type to FOK and still buy more expensive than I set the price. What is the issue because I think I gave up on MT5

Python How to calculate the quantity by investment and leverage

Hi, I am using python to build an expert advisor. Right now I have a function which calculate the quantity by the investment but dosent take into account the leverage so how I calculate the leverage? Here is my function: def qty_buy(symbol, investment, df): try : ## price = float

Python exclude Stocks and EFT from trading symbols

I have the following code for getting all symbols num_symbols = mt5.symbols_total() raw_symbols = mt5.symbols_get() if raw_symbols != None: for s in raw_symbols: selected = mt5.symbol_select(s.name, True) test_symbol = mt5.symbol_info(str(s.name))

Some symbols have no return code

As the title say, some symbols don't have return code so I get this error and I have no idea how to solve it. Support is appreciated