Category : algorithmic-trading

Following code doesn’t seem to work to Logon using FIX API. Getting "invalid credentials" from the exchange though same username and access key seem to work with REST API over websockets. Seems like issue with the definition of nonce. Here I am trying a basic example to try to Logon. string user = settings->get().getString("Username"); message.setField(Username(user)); ..

Read more

I need help to optimise the code as it becomes slow with a large dataset. I have an exchange simulation program that takes in market prices from a csv and then allows the user to place bids and offers for the products (currencies) that are up for trade, in OrderBook.cpp, i was looping(function getKnownProducte()) in ..

Read more

I’m trying to get historical data of forex contract (what doesn’t need any subscription) and get std::bad_alloc at m_pClient->reqHistoricalData(4001, contract, queryTime, "1 M", "1 day", "TRADES", 1, 1, false, TagValueListSPtr()); Here is the whole code: #include "stdafx.h" #include <Contract.h> #include <Order.h> #include <OrderState.h> #include <Execution.h> #include <CommissionReport.h> #include <ScannerSubscription.h> #include <executioncondition.h> #include <PriceCondition.h> #include <MarginCondition.h> ..

Read more

I am new in C++. I am trying to run a code from stackoverflow https://github.com/Chudleyj/AlgoBot . When I run the code it crashes. Can anyone help me. Here is the code (IEX.cpp). Json::Value IEX::stats::historicalDaily(std::string date) { Json::Value jsonData; std::string url(IEX_ENDPOINT); std::locale loc; //For isdigit if(!date.empty()) { if(date.size() == 8) { url += "/stats/historical/daily?date="+date; IEX::sendGetRequest(jsonData, url); ..

Read more