Topics
Replies

swapd0
14 Sep 2024, 21:50 ( Updated at: 15 Sep 2024, 05:25 )

A bit late but I think that the market was closed for gold because it was a bank holyday XD.


@swapd0

swapd0
14 Sep 2024, 16:56 ( Updated at: 15 Sep 2024, 05:25 )

New Version 0.4 available.

https://mega.nz/file/oINijA5Y#WyMMdPrShZSnRGp4d_oHAwPLGxtMlUI0KAoctCykLx8


@swapd0

swapd0
05 May 2024, 17:38 ( Updated at: 06 May 2024, 05:31 )

New version with OpenAPI, but still in development.

https://mega.nz/file/ZMtFXSyR#hzbpfI7E-lOaBFpVAjHGaW6WDn8hHL_mzt0aS5PdHYo


@swapd0

swapd0
04 May 2024, 21:02

I'm Sorry, it's my fault, I've something wrong in my login/logout code and I can't switch accounts.


@swapd0

swapd0
04 May 2024, 11:02

Some hours later it was fixed. It was strange because I couldn't modify any order, neither order size, SL or TP.


@swapd0

swapd0
27 Apr 2024, 13:34

Maybe on Monday I can capture some screen shots when the market is open.

I mean that, if I buy one lot of XAGUSD at 27.000$ and later when the silver is at 27.100$ I double the position. In cTrader web I got one position on XAGUSD with two lots at 27.050$

 

But if I send a ProtoOAReconcileReq message I receive two positions, one at 27.000$ with one lot and another one at 27.100$ with one lot. 


@swapd0

swapd0
08 Dec 2023, 13:55

Cool!, but my Mac is 10.14 and this one needs 10.15 or above…

I'll keep working on my trading application. 

 


@swapd0

swapd0
08 Nov 2023, 09:36

My broker is icmarkets.


@swapd0

swapd0
08 Nov 2023, 09:34

RE: News tab missing

PanagiotisCharalampous said: 

Hi there,

Which broker are you using?

Best regards,

Panagiotis

icmarkets.


@swapd0

swapd0
27 Jun 2023, 17:16

This new version runs so slow that most of the time I can't change the workspace...


@swapd0

swapd0
16 Jun 2023, 10:20

Older versions didn't work like this. You could have severals tabs with the same workspace but watching different symbols.


@swapd0

swapd0
11 Apr 2023, 11:29

Ok, I've a stupid bug with fragmented messages.


@swapd0

swapd0
11 Apr 2023, 10:06

RE:

kostya.bartchenkov said:

Just tried my ICMarkets account - works fine for me (used GBPUSD M5)

Yes, I also gets M5 candles, but it fails with M1.


@swapd0

swapd0
11 Apr 2023, 10:04

Ok, I get price alerts again.


@swapd0

swapd0
10 Apr 2023, 22:35

If I make a crap-hack to find the end of the message, and send the corrected length, it also fails. IMHO this means that ProtoOAGetTrendbarsRes messages are just wrong.

 


@swapd0

swapd0
10 Apr 2023, 22:00

This is the code to read a message.

First I read an int32_t to know the message length, and then I create the message using ParseFromArray or ParseFromPartialArray, I've seen that this code fails because the message length for trend bars is wrong, I get a size of 21,508 bytes but if I inspect the memory there's about 16,391 bytes, after that is full of zeros.

 

	mConnection->receive(mBuffer.data(), mBuffer.size(),
	[&](std::error_code ec, std::size_t size)
	{
		if ( !ec )
		{
			int32_t length;
			memcpy(&length, mBuffer.data(), sizeof(int32_t));
			// big endian to little endian
			length = ntohl(length);

			if ( length > mBuffer.size() )
				tools::Log().error("Message too big: " + std::to_string(length));

			if ( length > 0 )
			{
				ProtoMessage pmsg(OpenMessageFactory::message(mBuffer.data() + sizeof(int32_t), length));
				int type = pmsg.payloadtype();
				auto it = mObservers.find(type);
				if ( it != mObservers.end() )
					it->second.fn(pmsg, it->second.context);
				else
					tools::Log().error("Message not handled: " + std::to_string(type) + "with size: " + std::to_string(length));
			}
			receiveMessages();
		}
		else
		{
			tools::Log().error("Receive data: " + ec.message() + " size: " + std::to_string(size));
		}
	});

 

 


@swapd0

swapd0
09 Apr 2023, 16:21 ( Updated at: 09 Apr 2023, 21:43 )

RE: RE:

kostya.bartchenkov said:

swapd0 said:

No one is using OpenAPI and ICMarkets to access historical data? This is a bit frustrating :(

I also have an icMarkets account . I may try it out tomorrow if I have some time. What PAIR are you trying?

Any forex pair, but usually I choose AUDCAD because it's the first one in the list.

 

Right now I'm trying to use tick data to generate the 1min candles, I use set_clientmsgid to set the pair name but when I read the response I don't get any clientmsgid data. If I inspect the memory the message contains my clientmsdid but it didnt't read it... weird.

 

Edited:

Ok, when I create a ProtoMessage from the sockets buffer it fails (return false) on some messages. I downloaded the .proto messages about one month ago, and the lastest change was four months ago.

This function works when I receive Application and account messages, symbol list, spot prices, but fails when I receive ProtoOAGetTrendbarsRes although on D1 request I can read the candles.

 

ProtoMessage createMessage(void *ptr, size_t size)
{
    ProtoMessage msg;

    bool ok = msg.ParseFromArray(ptr, (int)size);

    tools::Log().check(!ok).error("Parse from array failed: " + std::to_string(msg.payloadtype()));

    return msg;
}

 


@swapd0

swapd0
08 Apr 2023, 12:02

No one is using OpenAPI and ICMarkets to access historical data? This is a bit frustrating :(


@swapd0

swapd0
06 Apr 2023, 19:03

Lucky you, this is still not working for M1, but H1 it works again.


@swapd0

swapd0
04 Apr 2023, 10:20

My broker is ICMarkets.


@swapd0