
Topics
Replies
PanagiotisCharalampous
02 Nov 2018, 12:24
Hi Patrick,
The designed behavior is charts to open in attached state in cTrader Trade and in detatched state in cTrader Automate. Could that be the reason you are getting different behavior in different cases?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Nov 2018, 09:27
Hi procumulative@gmail.com,
It could have been a different problem. Can we arrange a TeamViewer session? I have sent you an email in the past but you never replied.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Nov 2018, 09:24
Hi netread2004,
The exception probably comes from your cBot code. Can you share the cBots with us so that we can check?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 17:38
Hi netread2004,
We have checked our logs and response for 2092754372 was sent 300 ms after the order message. The message received after sending 2092754372 was not related to 2092754372 but to 815338978 as the CIOrdID. You should not rely on the sequence of the messages received but on the ClOrdID.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 16:13
Hi jelle2500,
Here you are
var tpBuy = Math.Round((MarketSeries.Low.Last(3) - Symbol.Ask) / Symbol.PipSize, Symbol.Digits); var tpSell = Math.Round((Symbol.Bid - MarketSeries.High.Last(3)) / Symbol.PipSize, Symbol.Digits);
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 15:58
Hi jelle2500,
Yes this is right.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 14:14
Hi .ics,
You can use cBots on Renko charts. There is no specific example as there is no difference to other chart types.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 14:12
Hi Nasser,
Spotware cTrader Beta cannot be used with brokers. Each broker has its own cTrader platform. However, it is not a matter of platform but a matter of what symbols does the broker offer for trading. You will to contact the brokers and find out if they offer stocks or not.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 13:59
Hi .ics,
Renko bars are available in 3.3. It has been rolled out to some brokers already.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 12:37
&customvariable=test
No it is just an example
And the request for code doesn't return json but html, we'll have to look for the "code" with the text?
The request for code does not return something. It redirects to Connect site where authentication takes place. After the user authenticates, he is redirected back to your application. The code is in the query string of the redirect request.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 12:20
Hi swain.sun,
The process goes as follows.
1) Redirect your application to connect site using your credentials
Response.Redirect(_connectUrl + "apps/auth?&client_id=" + _clientId + "&redirect_uri=" + HttpContext.Current.Request.Url.AbsoluteUri + "&customvariable=test&scope=trading");
2) The user will authenticate and then the Connect site with redirect back to your application with a Code in the query string. Read the Code
var code = HttpContext.Current.Request.QueryString["code"];
3) Now that you have the code, you can get the token
var token = AccessToken.GetAccessToken(_connectUrl, code, redirectUri, _clientId, _clientSecret);
Let me know if this helps.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 12:07
Ηι swain.sun,
I am not sure what the problem is. The function you posted performs a REST request and the token is returned in JSON format. Did you try to run the code?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 11:07
Hi Patrick.
The charts should always open attached to cTrader. If they open in a detached state then it is a bug. However, we could not reproduce when this happens. Any assistance in reproducing this problem would be appreciated.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 10:58
Hi swain.sun,
Maybe you would like to have a look at our sample, to see how the authenitcation process is implemented.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 10:50
Hi swain.sun,
To get an access token from production environments, you need to use https://connect.spotware.com/ and not https://sandbox-connect.spotware.com/
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 10:03
Hi swain.sun,
Thank you for posting in our forum. For development purposes, I would suggest to use a demo account on production environments instead of the sandbox.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 10:01
Hi Nasser,
Thank you for posting in our forum. cTrader supports stock CFDs, you can find some in Spotware cTrader Beta. Also many brokers offer stocks.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 09:52
Hi kontodospamu5,
You can expose a public method that will update the form's label and call it on tick as below
using System; using System.Linq; using System.Threading; using System.Windows.Forms; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class NewcBot : Robot { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } private Thread _thread; private Form _f1; protected override void OnStart() { _f1 = new Form(); _thread = new Thread(() => _f1.ShowDialog()); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); } protected override void OnTick() { _thread = new Thread(() => _f1.UpdateLabel("label")); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); } protected override void OnStop() { // Put your deinitialization logic here } } }
Let me know if this helps,
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
01 Nov 2018, 09:34
Hi ctid418503,
We will check this and fix it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
02 Nov 2018, 14:43
Hi Alexander,
The code you posted does not build. What help do you need? To fix the error?
Best Regards,
Panagiotis
@PanagiotisCharalampous