Topics
Replies
sifneos4fx
30 Jun 2021, 10:43
RE:
Thank you for your Answer. Indeed, both the JSON and the Object were not in a valid format. This is how I implement the classes:
public partial class License
{
[JsonProperty("success")]
public bool Success { get; set; }
[JsonProperty("data")]
public Data Data { get; set; }
}
public partial class Data
{
[JsonProperty("id")]
public long Id { get; set; }
[JsonProperty("orderId")]
public long OrderId { get; set; }
[JsonProperty("productId")]
public long ProductId { get; set; }
[JsonProperty("userId")]
public long UserId { get; set; }
[JsonProperty("licenseKey")]
public string LicenseKey { get; set; }
[JsonProperty("expiresAt")]
public DateTimeOffset ExpiresAt { get; set; }
[JsonProperty("validFor")]
public object ValidFor { get; set; }
[JsonProperty("source")]
public long Source { get; set; }
[JsonProperty("status")]
public long Status { get; set; }
[JsonProperty("timesActivated")]
public object TimesActivated { get; set; }
[JsonProperty("timesActivatedMax")]
public long TimesActivatedMax { get; set; }
[JsonProperty("createdAt")]
public DateTimeOffset CreatedAt { get; set; }
[JsonProperty("createdBy")]
public long CreatedBy { get; set; }
[JsonProperty("updatedAt")]
public DateTimeOffset UpdatedAt { get; set; }
[JsonProperty("updatedBy")]
public long UpdatedBy { get; set; }
}
Thank you once again!
amusleh said:
Hi,
Your question is not related to cTrader Automate API, you have to Google these types of questions or post your question on Stackoverflow.
Your object and Json have invalid format, try this:
using cAlgo.API; using Newtonsoft.Json; using System; namespace cAlgo { [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)] public class JsonDeserializeTest : Indicator { private string _json = @"{ success: true, data: { id: 14, orderId: 21, productId: 20, userId: 1, licenseKey: 'RS-KH-0G-6B-FD-A7-CS-W7', expiresAt: '2021-07-26 00:00:00' } }"; protected override void Initialize() { var licence = JsonConvert.DeserializeObject<Licence>(_json); Print(licence.Data.ExpiresAt); } public override void Calculate(int index) { } } public class Licence { public string Success { get; set; } public Data Data { get; set; } } public class Data { public int Id { get; set; } public int OrderId { get; set; } public int ProductId { get; set; } public int UserId { get; set; } public string LicenseKey { get; set; } public DateTime ExpiresAt { get; set; } } }
It works fine on my system, I removed some of your data object properties for brevity.
@sifneos4fx
sifneos4fx
28 Jun 2021, 09:59
( Updated at: 28 Jun 2021, 10:14 )
This is what I want to use:
Licence licence = JsonConvert.DeserializeObject<Licence>(json_str);
To do so, I'am referencing to the Newtonsoft.Json.dll -> https://www.nuget.org/packages/Newtonsoft.Json/
The namespace using Newtonsoft.Json; is now recognized, however, when building the project, i get the error "unable to load assembly", however, the bot works, but the "licence" object remains null.
@sifneos4fx
sifneos4fx
21 Dec 2019, 11:35
( Updated at: 21 Dec 2023, 09:21 )
RE:
Hello Panagiotis
you can reproduce the issue if you draw trendline in high timeframes 1m, 1w, 3d, 2d, 1d, and switch then to lower time frame. i.e.
Draw this line in 1m time frame.
Now, switching down to 1w, breaks the start and end point:
Drawing the line on 1w timeframe and switching down to 3d, trend line slips too.
PanagiotisCharalampous said:
Hi Patrick,
There is a known issue in cTrader with trend lines. Can you tell me in which timeframe you are drawing the lines and start and end point coordinates so that I can reproduce the issue and let you know what happens?
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
16 May 2019, 12:43
RE:
oops, sorry about that, somehow I missed this "Use Chart.DrawStaticText"!
Thank you
PAtrick
Panagiotis Charalampous said:
Hi Patrick,
I am not sure what suggestions do you need. The warnings are clear. You shoud use Chart.DrawStaticText() instead.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
07 May 2019, 17:59
RE:
The hint to track responses is the key in my solution!
Thank you!
Patrick
Panagiotis Charalampous said:
Hi Patrick,
There is no single line solution for this. In general, you should keep track of the orders sent and the responses received. If e.g. you have a max number of 50, 48 positions open and 2 orders in progress, for which a response has not beed received, them probably you will have 50 positions soon. In this case, you should not open any further positions. You could have a global counter for the orders in progress (static variable?) which will be increased just before sending the order and decreased after a TradeResult is received.
Let me know if the above helps
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
07 May 2019, 15:45
RE:
This is exactly what happens some times in high volatitliy situations, it is selten but I want to fix it. So, any suggestions where to start?
Thank you
Patrick
Panagiotis Charalampous said:
Hi Patrick,
Positions property is updated after the order is successfully executed and the relevant message sent back to the application. If you execute trading in between, there is a change to send orders before Positions is updated. Therefore, if you need to be strict with the number of positions, you would need to implement more complicated checks to avoid this situation.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
17 Mar 2019, 11:21
RE:
Sorry, my bad. Because the issue with thte bloured fibonacci lines has been fixed, I htought it was the shourtcut issue too.
I must say, cTRader it is very stable, I had not a single crash last 18 months!!!!
Best,
Patrick
Panagiotis Charalampous said:
Hi Patrick,
We never actually reported that this was fixed. We are still working on this. In the meanwhile, please avoid using dotted lines.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
12 Mar 2019, 15:37
RE:
Any news here?
sifneos4fx said:
Hello Panagiotis
With the lates release came back the previous bug (see here: https://ctrader.com/forum/ctrader-support/15771). The lines are no more bloured, however, arrow shortcuts to change timeframe doesn't worj for 15m, 5m and 1m chart.
Best Regards,
Patrick
@sifneos4fx
sifneos4fx
08 Mar 2019, 11:29
In Spotware Public Beta I don't see any targets at all. In FXPro cTRader 3.3 I see all targets but the weekly. The weekly target is the same as the 1D Target.
@sifneos4fx
sifneos4fx
06 Mar 2019, 11:31
Hello Panagioti
With the newest cTrader update, the "Fibonacci" issue is been fixed. Fibo lines are now all same thick/slim, no blouriness any more and dotted lines does not effect any more the timeframe shortcuts.
Well done!
Thank you!
Patrick
@sifneos4fx
sifneos4fx
27 Feb 2019, 11:25
RE:
Hello Panagiotis
Indeed, changing from dots to lines solves the problem. I believe, that was a tough nut to crack. Thanks!
Best,
Patrick
Panagiotis Charalampous said:
Hi Patrick,
As you have been informed by email, we have reproduced the issue and will be fixed in an upcoming update. In the meanwhile you can avoid using dashed lines on fiboniacci retracement tool which seems to cause the issue.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
26 Feb 2019, 10:23
( Updated at: 21 Dec 2023, 09:21 )
RE:
Hello Panagiotis
There are several Directories and Files, see attachmant. Which one?
Panagiotis Charalampous said:
Hi Patrick,
Can you please send us your settings file at community@spotware.com? You can find it at C:\Users\UsernameAppData\Roaming\Broker cTrader.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
25 Feb 2019, 10:09
RE:
Surre, couldn't load it here, find recording here: http://sifneos.com/cTRader-timeframe-shortcuts.mp4
As I hit arrow key, you may see how the quicklink is been properly highlighted, however, the timeframe changes by the time the mouse pointer crosses the quicklink bar, no click is needed, just mouse over...
Panagiotis Charalampous said:
Hi Patrick,
I triend this but I cannot reproduce it. Charts change with up and down arrows. Is there a chance that your cTrader lost focus and does not respond to the buttons any more? Can you record a short video demonstrating the behavior with the mouse?
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
23 Feb 2019, 10:14
I found out, when I restart cTRader, dettached watchlists are shown after I right-click somewhere within an attached or detached chart-area.
@sifneos4fx
sifneos4fx
21 Feb 2019, 08:04
RE:
Googd morning Panagiotis
I got 3x24" Lenovo Thinkvision 2560x1440.
When scaling is 100% no bluriness on side menus, however Fibonacci lines still blured. When using scaling bigger than 100% side menus are blured.
However, I dont care about the menus, sharp lines (or dots) for Fibonnaci it is much more important.
Thank you
Patrick
Panagiotis Charalampous said:
Hi Patrick,
We will need some more information regarding this. Can you please let us know the following?
- How many monitors do you use?
- What is the resolution of each one?
- Do you use any scaling and what scaling?
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
20 Feb 2019, 10:39
RE:
Can't reproduce now as well, seems to be a network/broker issue, I wil do a video if I can reproduce it again...
Panagiotis Charalampous said:
Hi Patrick,
I cannot reproduce such behavior. Any chance you can record a short video demonstrating this behavior?
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
19 Feb 2019, 12:20
RE:
Hello Panagiotis
I did new about linked charts. However, I believe good software gives to all users the same possibilities, one works this way another works the other way. I agree that linked charts are for some traders very important, to me are useless, but I got no possiblity to return to previous small tabs. There must be a possiblity to turn linked chart off and have small tiny tabs.
Than you
Patrick
Panagiotis Charalampous said:
Hi Patrick,
Thanks for your feedback. FYI linked charts has been one of the most voted features. Shortcuts will come in future versions but I cannot commit when. Nevertheless, they are in our backlog.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
18 Feb 2019, 11:38
RE:
Great!
Panagiotis Charalampous said:
Hi all,
We will add this option in one of the future updates.
Best Regards,
Panagiotis
@sifneos4fx
sifneos4fx
03 Apr 2022, 09:18 ( Updated at: 21 Dec 2023, 09:22 )
RE: RE: RE: RE: RE: Can we buy the whole suit now
Hi there,
Please send an email to: support@elliottwaverobot.com, I may send you the bot to your mailbox.
Best regrds,
driftingprogrammer said:
@sifneos4fx