Forum

Account Login, Server Discovery, and Timeout Bugs

Hi everyone, I've been encountering several issues when working with the MetaTrader 5 (MT5) Python API related to account login and server management. I wanted to share my observations and see if anyone has experienced similar problems or found solutions. Here's a detailed breakdown: 1. Timeout when

MetaTrader5 Python API

I’m looking to build an online analytics platform similar to [redacted] , where traders can connect their accounts simply with login, investor password and server name. Looking into this further, I can see services such as [redacted] which offer an API which meets this need, however when looking

MT5 Python Library - How to get the FINAL stop loss price of a trade

The MetaTrader for Python documentation shows users can only use the history_orders_get and history_deals_get functions to access historical trade data, rather than a simple history_positions_get function. On MT5, trades are split into 5 elements; Position 'In' Order 'In' Deal 'Out' Order

EA opens two positions at the same milisecond

Hello, I am using the following function within my EA to only open trades at the start of a new bar if the entry criteria are met. //+------------------------------------------------------------------+ bool new_bar( ENUM_TIMEFRAMES timeframe) { //--- memorize the time of opening of the last bar in

FileWrite only in one cell

Hi all, I'm writing a CSV filewrite feature in my EA to basically track my equity curve as well as other data. This code works but everything is printed in one cell, rather than a different column for each parameter - any ideas? if (new_bar( PERIOD_M5 )) { string csv_name = "Infinity

Help With Array

Hello, I am working on being able to input an array of values into a moving average function to be able to create an MA of any set of data basically. But before I get to that point, I am trying to improve my knowledge of arrays as I feel under-developed. I am simply trying to put the Ask value into

Alternative to Pinescript table.new() built-in function

Hello, I can't see a 'straight forward' way of creating a table on a chart, in the simplicity that Pinescript offers the table.new() and table.cell() functions - is the easiest solution to create a table using ObjectCreate() and OBJ_TREND? I'm interested in making a handy strength indicator for MT5

Reduce Quantity of Notifications

Hello, I like to enable the mobile notifications on my MT5 terminal so I can see when my EA is opening new trades & when they are closed etc. However I get SPAMMED when my trailing stop modifies trades or fails to modify trades. Is there a way to limit what gets sent through to the mobile push

MQL5 to Telegram

Hello guys, I've found a way to send out trade details from MT5 to telegra using the following function (Sorry I can't find where I got this from!): void telegram_send( string token, string chat_id, string message) { string cookie= NULL ,headers; char post[],result[]; int res; string

Correlation Filter

Hello, I have written a correlation filter in to stop my EA from opening a trade if Symbol() has a correlation over 75% or under -75% of any open positions. I've been running it on a live non-execute account for the last two weeks and there are numerous positions which have been placed which are