Topics
23 Oct 2023, 22:43
 219
 2
19 Oct 2023, 13:04
 246
 4
01 Oct 2023, 22:33
 347
 1
13 Oct 2022, 10:20
 557
 2
24 Dec 2020, 04:37
 0
 755
 1
24 Dec 2020, 04:35
 0
 703
 1
24 Dec 2020, 04:34
 0
 712
 1
24 Dec 2020, 04:33
 1
 1155
 5
Replies

acrigney
17 Jun 2020, 03:07

RE:

Mate I think you would have to post your code to make accusations like this. Have you got some randomness in your code logic?

shapebubble said:

Hi ya

 

I've been doing a lot of back tests on Ctrader and have noticed that it seems flawed. The system returns different result each time, doesn't trade at all the opportunities and reliably returns losses. I came to this realisation because I noticed that it was returning reliable losses and so had an algo made the did the opposite. However it still returned losses and did not do the same trades. If I have 2 ctraders open and run the same test with the same algo over the same dates I get different results. If I close the program, open again, enter the same data and rescan I get different results.

 

I can't see how the system is usable if it is so unreliable. I have tested both Clickalgo algo's and a freelancers and Ctrader just seems so unreliable.

 

Does anyone else have this problem?

 

Thanks

 

Adam

 


@acrigney

acrigney
21 May 2020, 16:47

RE:

PanagiotisCharalampous said:

Hi patrick.sifneos@gmail.com,

Thanks for posting in our forum and reporting this issue. Can you please post a sample cBot that we could use to reproduce this issue?

Best Regards,

Panagiotis

I think this is still true.


@acrigney

acrigney
21 May 2020, 08:41

RE:

PanagiotisCharalampous said:

Hi burakocak1903,

Thanks for your suggestion. We will be definitely adding this feature in a future release.

Best Regards,

Panagiotis

This feature has definitely not been added yet in my experience. Its probably something that should be configured separately for backtesting?


@acrigney

acrigney
09 Mar 2020, 01:25

RE: Delete old demo accounts or reset balances

With the smart client it does not look like there is a x to delete the old demo accounts or maybe is there a way to reset their balances?

Zjhehe said:

Ok, thanks

 


@acrigney

acrigney
05 Mar 2020, 09:39

RE:

So sorry mate I ment to type poll! So I can use the TickDataReq to poll for any new tickdata up to the last millisecond and if I don't get any new data I will just sleep for a milli sec and then try again?

PanagiotisCharalampous said:

 

Hi acrigney,

I do not understand what do you mean when you say "pool". You can get historical tick data using ProtoOAGetTickDataReq and you can get spot prices streamed to you using ProtoOASubscribeSpotsReq.

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
05 Mar 2020, 00:48

RE:

Actually mate that had didn't work, have to look if I really need this or not.

PanagiotisCharalampous said:

Hi acrigney,

Change it to the below

 var type = "Received: " + OpenApiMessagesPresentation.ToString(protoMessage);

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
05 Mar 2020, 00:47

RE:

So it looks like the only way to get the latest tick data is to pool for it?

kerrifox19 said:

Thanks for sharing this info with us.

 


@acrigney

acrigney
04 Mar 2020, 15:01

RE:

Get the latest tick data.

PanagiotisCharalampous said:

Hi acrigney,

What does GetTickData() supposed to do?

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
04 Mar 2020, 13:00 ( Updated at: 21 Dec 2023, 09:21 )

RE: RE:

acrigney said:The problem was that I added this statement to the listen function that was causing it to crash

var type = String.Format("Received: " + OpenApiMessagesPresentation.ToString(protoMessage));

The error is "Input string was not in a correct format." I don't see why this doesn't work.

Weird mate! must be something wrong with my machine, I rebooted before I will try that again.

PanagiotisCharalampous said:

Hi acrigney,

I tested your token and seems fine to me

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
28 Feb 2020, 09:51 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Weird mate! must be something wrong with my machine, I rebooted before I will try that again.

PanagiotisCharalampous said:

Hi acrigney,

I tested your token and seems fine to me

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
28 Feb 2020, 09:35

RE:

I emailed you my main.cs file.

PanagiotisCharalampous said:

Hi acrigney,

Please send the client ID, client Secret, token and host in text format at community@spotware.com so that I can check.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
28 Feb 2020, 09:24

RE:

Thanks mate!!!

PanagiotisCharalampous said:

Hi acrigney,

US30 is 10015. 10016 is XBRUSD.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
28 Feb 2020, 09:23 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Still no luck mate, I have not changed the code and I had checked it in before so I can see if there are any changes, I had created new tokens and I checked the old tokens that worked before but its not working now.

PanagiotisCharalampous said:

Hi acrigney,

I just tried this and I see no issues. Please make sure everything is correct.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
16 Feb 2020, 14:40 ( Updated at: 21 Dec 2023, 09:21 )

RE: Chart show -103% but shows only a small ending equity.

This algo again has no loosing trades, a profit and small ending equity but why does the chart show -103%

tasr1r1 said:

Hi Panagiotis

 

Thank you for  your explanation.

Imho, 'Total Trades' should reflect opened and closed position for better analysis so coder can trace which trades i.e. sale or buy which caused the MC.

Hope this can be reflected in the Trade Statistic report in the future.

 


@acrigney

acrigney
12 Feb 2020, 13:48

RE:

Mate my broker just got back to me today and told me they need to give me access to the Open API.

Here was the comment from them.
 

I have just spoken to our operation team manager, we are very happy to offer you the Open API from our end.

 

If you would like us to put this on your trading account, please reply to confirm with your trading account number, so I can lodge a request soon from my side.

Here is my client id/secret

  private string _clientId = "496_vI2DH0hQustu5QVfgvrAzjfXABcOsMjxvZ5CdS5YJJFPrGsgp7";
        private string _clientSecret = "Tp3VYWgbIE5QPbLNlVvdzVZf8v4RZ5uznovfOFJvHJHueqQuDo";

and here are some tokens from one of my brokers.
        private string _accountToken = "oTDQmYI80fl841VS7JwSt3bG1lAG5YriqxA_cfpz4lM";
        private string _tradeToken = "p0mvYdG78l369cjdeUmAh3r5Fs2GCqLUaAoewAglGOE";
        private string _apiHost = "demo.ctraderapi.com";
 

PanagiotisCharalampous said:

Hi Alistair,

Please send me clientID, clientSecret and a valid token at community@spotware.com and I will have a look at what is going on. 

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
12 Feb 2020, 03:49

RE:

Thanks mate, its the first time I have used the Open API in a long time, it fails every time now. I contacted my broker and they sent me this

Pepperstone current account holders with a minimum of AUD$250m trading volume per month may apply for a FIX Demo Environment to test our FIX Capabilities.

If you'd like to discuss API trading, please email premium@pepperstone.com.

But the Open API is not a FIX api?

PanagiotisCharalampous said:

Hi Alistair,

No environment connection means that the server of the broker of this account is not linked to our Open API proxy. Do you get this message on a consistent basis or was it something temporary?

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
10 Feb 2020, 10:21

RE:

PanagiotisCharalampous said:

Ok great but why do I get this error? I am sure I have the client id, secret code, account and I have added a trade access token for trade operations.

Received: ProtoMessage{ErrorResponse{errorCode:CANT_ROUTE_REQUEST, description:No environment connection}}
Received: ProtoMessage{ErrorResponse{errorCode:INVALID_REQUEST, description:Trading account is not authorized}}

Hi Alistair,

These are not account numbers but account IDs (ProtoOATrader.ctidTraderAccountId). If you want to get the trading account number use the ProtoOATrader.traderLogin field.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

acrigney
10 Feb 2020, 06:40

RE: RE: My borker said that Open API only works for live accounts? that can't be right?

acrigney said: Now my broker peperstone has added a live account for me and linked it to my CTrader id but I get this error when I click GetAccountsList

My live account number is 1038733

 

Send: ProtoMessage{AppAuthRequest{clientId:496_vI2DH0hQustu5QVfgvrAzjfXABcOsMjxvZ5CdS5YJJFPrGsgp7, clientSecret:Tp3VYWgbIE5QPbLNlVvdzVZf8v4RZ5uznovfOFJvHJHueqQuDo}}
Received: ProtoMessage{ApAuthResponse}
Send: ProtoMessage{GetAccountsByAccessTokenReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17616995}}
Send: ProtoMessage{PotoOATraderReq}
Received: ProtoMessage{GetAccountsByAccessTokenRes{ID: 17616995 Status: Live
}}
Received: ProtoMessage{ErrorResponse{errorCode:CANT_ROUTE_REQUEST, description:No environment connection}}
Received: ProtoMessage{ErrorResponse{errorCode:INVALID_REQUEST, description:Trading account is not authorized}}

 

acrigney said: Peperstone just told me that Open API only works for live accounts. Is that correct?

Dear Support,

I am running the CTrader Open API and I have created a CTrader Open API application on their web site according to their instructions.
However when I run the sample application I do not see my list of accounts and I get a permission error when I attempt to trade on my demo account with you.
The problem is that the Open API account numbers are different to the account numbers that you have given me for my account acrigney@gmail.com

Here is the response from the Open API.
Send: ProtoMessage{AppAuthRequest{clientId:496_vI2DH0hQustu5QVfgvrAzjfXABcOsMjxvZ5CdS5YJJFPrGsgp7, clientSecret:Tp3VYWgbIE5QPbLNlVvdzVZf8v4RZ5uznovfOFJvHJHueqQuDo}}
Received: ProtoMessage{ApAuthResponse}
Send: ProtoMessage{GetAccountsByAccessTokenReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17537049}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:10453609}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17536979}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17537170}}
Send: ProtoMessage{PotoOATraderReq}
Received: ProtoMessage{GetAccountsByAccessTokenRes{ID: 17537049 Status: Demo 
ID: 17537112 Status: Live
ID: 10453609 Status: Demo 
ID: 17537165 Status: Live
ID: 17536979 Status: Demo 
ID: 17537170 Status: Demo 
}}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{ErrorResponse{errorCode:INVALID_REQUEST, description:Trading account is not authorized}}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{Heartbeat}
Received: ProtoMessage{Heartbeat}


And here are the accounts that I have with a few brokers and 3192091 is my demo pepperstone account number.

This app would like to view:
Your cTrader ID (acrigney)
Your email (acrigney@gmail.com)
Get full access for trading accounts (view accounts info and trading):
Demo 4000102 - Scandinavian Capital Markets
Demo 3192091 - Spotware
2038460 - IC Markets
Demo 10346288 - FxPro
Demo 3653646 - IC Markets
Live 8154580 - FxPro

So why is the account number from the Open API different to yours? Same for the other brokers I guess.

Best Regards,
                           Alistair

 

 


@acrigney

acrigney
10 Feb 2020, 04:19

RE: My borker said that Open API only works for live accounts? that can't be right?

acrigney said: Peperstone just told me that Open API only works for live accounts. Is that correct?

Dear Support,

I am running the CTrader Open API and I have created a CTrader Open API application on their web site according to their instructions.
However when I run the sample application I do not see my list of accounts and I get a permission error when I attempt to trade on my demo account with you.
The problem is that the Open API account numbers are different to the account numbers that you have given me for my account acrigney@gmail.com

Here is the response from the Open API.
Send: ProtoMessage{AppAuthRequest{clientId:496_vI2DH0hQustu5QVfgvrAzjfXABcOsMjxvZ5CdS5YJJFPrGsgp7, clientSecret:Tp3VYWgbIE5QPbLNlVvdzVZf8v4RZ5uznovfOFJvHJHueqQuDo}}
Received: ProtoMessage{ApAuthResponse}
Send: ProtoMessage{GetAccountsByAccessTokenReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17537049}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:10453609}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17536979}}
Send: ProtoMessage{PotoOATraderReq}
Send: ProtoMessage{AccAuthRequest{CtidTraderAccountId:17537170}}
Send: ProtoMessage{PotoOATraderReq}
Received: ProtoMessage{GetAccountsByAccessTokenRes{ID: 17537049 Status: Demo 
ID: 17537112 Status: Live
ID: 10453609 Status: Demo 
ID: 17537165 Status: Live
ID: 17536979 Status: Demo 
ID: 17537170 Status: Demo 
}}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{unknown}
Received: ProtoMessage{ErrorResponse{errorCode:INVALID_REQUEST, description:Trading account is not authorized}}
Received: ProtoMessage{AccAuthResponse}
Received: ProtoMessage{Heartbeat}
Received: ProtoMessage{Heartbeat}


And here are the accounts that I have with a few brokers and 3192091 is my demo pepperstone account number.

This app would like to view:
Your cTrader ID (acrigney)
Your email (acrigney@gmail.com)
Get full access for trading accounts (view accounts info and trading):
Demo 4000102 - Scandinavian Capital Markets
Demo 3192091 - Spotware
2038460 - IC Markets
Demo 10346288 - FxPro
Demo 3653646 - IC Markets
Live 8154580 - FxPro

So why is the account number from the Open API different to yours? Same for the other brokers I guess.

Best Regards,
                           Alistair

 


@acrigney

acrigney
02 Jul 2018, 07:11

Any update on this guys?


@acrigney