Questions tagged [forex]

Use this tag for programming-related questions concerning the foreign exchange market (FOREX). Non-programming questions, and questions asking us to recommend an API, library or other off-site resource, are strictly off-topic.

The foreign exchange market (FOREX, FX, or currency market) is an international market trading currencies in currency pairs. Major currency pairs include EUR/USD (trades between the Euro and the US Dollar) and GBP/USD (trades between the British Pound and the US Dollar).

Resources

289 questions
36
votes
2 answers

What's the best API for automated forex trading?

I am interested in writing a small automatic trader for the forex market. I would like to chose my own tools (platform and programming language) and I just need to find a decent API to query the numbers and that accepts requests for trading actions.…
Hugo
  • 1,065
  • 1
  • 10
  • 11
32
votes
3 answers

almost live forex currency rates

I need to get live forex exchange rates for my personal application. I know that there's no free service that has this data available for download. I've been using Yahoo Finance, but I've just found out that it has a delay of 15 minutes or so. Is…
Marius
  • 3,976
  • 5
  • 37
  • 52
14
votes
9 answers

Forex historical data in Python

I need solutions to get historical Forex data in Python. For stocks it is easy: import pandas as pd import pandas_datareader as pdr start = dt.date.today() - dt.timedelta(days=30) end = dt.date.today() df = pdr.DataReader('AAPL', 'google', start,…
Yster
  • 3,147
  • 5
  • 32
  • 48
8
votes
1 answer

How to decompile a ex4 file new build 600+

If you don't know, an ex4 file is a file created in the MQL language (Auto trading robots). There is a decompiler that can decompile old builds of this type of files, but after build 600 there is no decompiler. I have valuable EAs(Forex robot) that…
Micheal
  • 89
  • 1
  • 1
  • 5
5
votes
0 answers

How exactly does trail_price, trail_offset work in pinescript?

Thank you all for your help so far. I have been coding many different strategies in pinescript so far, and I have read through pinescript manual and many google articles, but I am still confused as to how trailing stop work in pinescript. For…
5
votes
3 answers

select range when value is higher than in previous value

How to get all records where value is higher than previous value. For example, first range in the table below start on id 1 and ends on id 6, next range is from 7 to 10, etc... id Open 1 1.30077 2 1.30088 3 1.30115 4 1.30132 5 1.30135 6 …
5
votes
2 answers

Perl - HTTP::Proxy capture XHR/JSON communication

The site http://openbook.etoro.com/#/main/ has an live feed what is generated by javascript via XHR keep-alive requests and getting answers from server as gzip compressed JSON string. I want capture the feed into a file. The usual way (WWW::Mech..)…
kobame
  • 5,766
  • 3
  • 31
  • 62
4
votes
1 answer

Getting prices of broker without MT4

I am trying to do some stuff in Forex with low latency. I'm currently using mql. But as far as I see MT4 terminal is very slow and I can't execute as fast as i want. I am guessing mt4 terminal getting the prices with some FIX message and sends…
mert
  • 88
  • 9
4
votes
2 answers

MQL4 Function pointer / function callback solution

As far as i have seen function pointers do not exist in MQL4. As a workaround i use: // included for both caller as callee side class Callback{ public: virtual void callback(){ return; } } Then in the source where a callback is passed…
Joel Box
  • 429
  • 1
  • 6
  • 12
4
votes
2 answers

Sample call to Interactive Brokers for a currency pair?

I'm attempting to run Interactive Broker's included code sample. http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf On about page 42 it details how to pull market data feeds. My question is, has anyone successfully put in the…
Erik
  • 2,782
  • 3
  • 34
  • 64
4
votes
3 answers

Web service for live Forex data for Eastern Europe currency?

Is there a Web service for live Forex data for Eastern Europe currency? The yahoo data is updated with a couple of minutes delay, so I don't want to use that. I've seen some Java Applets, but thy are no use, as I can't extract any data from them. As…
luvieere
  • 37,065
  • 18
  • 127
  • 179
3
votes
2 answers

Interactive Brokers: Unable to fetch Forex Historical data

I am trying IB very the first time. I am trying to fetch historical data of $EUR but I am getting an error: Error 162, reqId 3: Historical Market Data Service error message:No historical market data for EUR/CASH@FXSUBPIP Last 1800,…
Volatil3
  • 14,253
  • 38
  • 134
  • 263
3
votes
3 answers

How to code and compile mql4 and mql5 language in VS Code?

I moved to mql4 and mql5 programming language. But, MetaEditor is very noob to code with, so I want to code mql4 language and compile with VS Code. If you have any solution please share with us..... Thanks
3
votes
1 answer

Is it possible to read real live (Energy and Metal)data from Forex using python

I have python code which only read real live data such currencies: df1 = yf.download(tickers = 'audusd' ,period ='1d', interval = '1h') df2 = yf.download(tickers = 'usdjpy' ,period ='1d', interval = '1h') but for gold (xauusd) and Natural…
kuwil
  • 39
  • 2
3
votes
1 answer

Algotrading: How to incorporate this type of trailing stop?

I currently have a system that opens a trade almost every 5 minutes. I'm currently trying to wrap my head around creating a trailing stop loss that does something like this: scan all open orders every tick and modify them, if they have not been…
1
2 3
19 20