Levente Csibi / Publications
Forum
Help with Time Zone Handling and Data Fetching in MT5
I’m reaching out for some clarification about how MT5 handles time zone offsets when fetching historical data. Here’s the scenario: My current local time in Budapest (UTC+2) is 10:34 AM . The broker’s time zone is Cyprus (UTC+3) , so it's 11:34 AM in Cyprus. UTC time is currently 8:34 AM . I assumed
How to fetch whether a symbol currently accepts orders via MT5 Python API?
As in the title, I want to have realtime information via MT5 in Python whether a given symbol currently allows trading or not. I want to have the same real-time information as what I have when opening MetaTrader and attempting to buy/sell a given instrument. The UI will not allow me do that for
Meta Trader in invisible/headless mode?
I have a script that launches the Meta Trader terminal and runs some EAs on a regular basis. For this, I use an MQL config file that I run this way: C:\Program Files\MetaTrader 5 \terminal64.exe /config:path\to\MetaTrader\folder\config\custom_config.ini The problem is that the Meta Trader window
MQL config file to automatically log in?
Based on the documentation which lists a Login and a Password entries, I thought creating my custom config file that would allow me to run EAs programatically from a Windows command line should be a relatively straightforward task. I created the following very basic .ini file, almost identical to
Inbuilt AMA inconsistency when using iCustom
I have a working script - to a huge part thanks to the precious help I had received from this forum. The script now successfully performs the following steps: gets a filename input and reads the corresponding csv file that contains Yahoo Finance OHLCV data for a given stock, e.g. Microsoft
Calculating RSI on array from csv file in MQL5?
I have a bunch of csv files in MQL5/Files and a function that reads a csv into an array called output_arr[]. The function prototype is: void ReadCsvData( double &output_arr[], string ticker, string column= "close" ) It works fine and I am able to view close prices (or any other OHLCV values) in the
iCustom on array?
I know that for some indicators there exists an ...OnArray() version in MQL4 (e.g.: iMAOnArray(), iRSIOnArray() etc.). I want to apply any custom indicator on an arbitrary array but it seems iCustom() doesn't support this. I'd be surprised if indicator calculation on an array of values was only
Efficiently reading in a csv file?
I placed "AAPL.csv" into the MetaTrader terminal folder 's Files subfolder (MQL4/Files) to be accessible by the EA. The structure of this csv is as follows: Date,Open,High,Low,Close,Adj Close,Volume 1980 - 12 - 12 , 0.1283479928970337 , 0.1289059966802597 , 0.1283479928970337 , 0.1283479928970337
EA to open position based on consecutive PSAR values
Hi there, I am new to MQL4 programming and came across the following practice problem online: create an EA which checks the previous N = 10 candles and if PSAR is consecutively above than iOpen() for all these N = 10 candles, open a sell position; if PSAR is consecutively below iOpen() for N = 10
How to draw MA of OBV indicator?
Hi everyone, I'm a newbie who recently started learning MQL4. I've been struggling with the problem below for quite a while now without success. Basically what I'd like to achieve is having the OBV indicator with a moving average in a separate indicator window. I used the OBV.mq4 for a start and