What's new in cAlgo API 3.0

27 Feb 2018, 10:53What's new in cAlgo API 3.0#1
Spotwareposts: 3336since: 23 Sep 2013

StopLimit order
Added support for StopLimit orders.

// Place StopLimit order
PlaceStopLimitOrder(TradeType.Buy, Symbol, 10000, Symbol.Ask + 10 * Symbol.PipSize, 1);

// Get all StopLimit orders
var stopLimitOrders = PendingOrders.Where(o => o.OrderType == PendingOrderType.StopLimit);

Trailing Stop
Added support for Trailing Stop parameter.
cTrader supports Trailing Stops for positions that work on server side. Position has a boolean parameter called HasTrailingStop.
If Trailing Stop is set, StopLoss will be changed when price moves in your favor.
You can set this parameter during position opening or when placing a pending order. Also, you can change it in ModifyPosition or ModifyPendingOrder methods.

Stop trigger method
cTrader supports different Stop Trigger methods for Stop, StopLimit orders and for positions Stop Loss.
Now these parameters available via API using methods to open position, place pending orders and using modify methods.
There are 4 different trigger method:

  • Trade
  • Opposite
  • DoubleTrade
  • DoubleOpposite

AccountType
Added property Account.AccountType. It can be Netted or Hedged.

StopOut Level
Added property Account.StopOutLevel.

Dynamic Leverage
Now you can get multiple tiers of Symbol leverage using Symbol.DynamicLeverage.

Fractional Volumes

Up to now, cAlgo API accepted only integer values for volume in trading operations. Also some data could be accessed using integer properties only, like position volume, Symbol volume settings etc. With the introduction of cryptocurrencies, now there are instruments that can be traded using fractional units volume. To adapt to these changes, we added possibilities to work with fractional volumes using API.

For trading operations you can pass double value as volume parameter. Both integer and double values are working:
ExecuteMarketOrder(TradeType.Buy, Symbol, 1);
ExecuteMarketOrder(TradeType.Buy, Symbol, 0.5);

For volume properties we added new properties of type double, that replace old integer properties that are now deprecated.
Instead of old 'Volume' properties, you should use new 'VolumeInUints' properties. Here are some example:
Position.Volume -> Position.VolumeInUnits
HistoricalTrade.Volume -> HistoricalTrade.VolumeInUnits
Symbol.VolumeMin -> Symbol.VolumeInUnitsMin
MarketDepthEntry.Volume -> MarketDepthEntry.VolumeInUnits
etc.

Modify position volume and reverse position
Now you can change volume of existing position using ModifyPosition method
Also position could be reversed using ReversePosition method

Market Hours
Added access to Symbol trading session. You can get sessions using Symbol.MarketHours.

Connection status
Now you can get current connection status to the server using Server.IsConnected property.
Also added events Server.Connected and Server.Disconnected.

Trading events
Added new trading events:

  • Positions.Modified
  • PendingOrders.Created
  • PendingOrders.Modified
  • PendingOrders.Cancelled with cancellation reason

Also Position.Closed event now contains close reason.


TRADERS FIRST™ Vote for your favorite features: http://vote.spotware.com/
02 Mar 2018, 09:21#2
ClickAlgoposts: 341since: 05 Feb 2015

Nice work people, do you know when the roll-out will take place?

These are much-needed features and most welcome, thanks.

Paul Hayes
cTrader Software Vendor
Emailcontact@clickalgo.com
Phone: (44) 203 289 6573
Websitehttps://clickalgo.com


~ We give power to traders with creative technology ~
02 Mar 2018, 09:56#3
afhackerposts: 41since: 15 Oct 2015

First thanks for adding this new features but what about community requests? where is multi-symbol backtesting? or different parameter types like Enums, date time picker,...

And is there any property to get a collection of all available symbols? that will be a simple feature to add before releasing the new version of API.

The current API library is based on .Net framework 4 which is obsolete, please update the .Net version to > 4.6 at least.

Another main issue of current API is limited drawing, please improve the API chart drawing feature by adding:

1. Transparency

2. Different shapes drawing

3. Checking current objects on chart and modifying those objects

4. A collection of objects drawn by current indicator or cBot

And please add a property to get the user platform (not system as it's available by .Net) time zone as a .Net TimeZoneInfo object.

Adding all these features will not get much time but I don't know why Spotware is very slow in adding new features?

Multi-symbol backtesting is one of the top suggestions and most voted of the community so please add it!


http://algodeveloper.com/
02 Mar 2018, 10:28RE:#4
Andrey Pisarevposts: 45since: 28 Jun 2017

Hi Paul,

Thank you!

Usually, it takes a couple of weeks to test a new version on beta. After we begin to roll-out it for different brokers. 

Best Regards,
Andrey

 

Paul_Hayes said:

Nice work people, do you know when the roll-out will take place?

These are much-needed features and most welcome, thanks.

Paul Hayes
cTrader Software Vendor
Emailcontact@clickalgo.com
Phone: (44) 203 289 6573
Websitehttps://clickalgo.com

 


Product Manager of cTrader Automate at Spotware
02 Mar 2018, 11:29RE:#5
Andrey Pisarevposts: 45since: 28 Jun 2017

Hi Afhacker,

Thank you for your feedback!

Currently, we are testing a top requested feature - Visual Backtesting. It would be in the next release.
We didn't start to work on multi-currency backtesting yet, but it is in our top priorities as a second top requested feature by the users.

We are finishing with the updated version for ChartObjects API that has the following features:

  • Get a link to the object and change object properties later
  • Check if an object is still on the chart
  • Get existing objects on the chart or indicator panel
  • Events for chart objects (added, updated, removed, hovered, selected)

Also, we have a new Color type, where you can specify transparency.

Regarding other features you mentioned.

We are planning to update .Net version in the near future. For this, we need to update cTrader to the same .Net version. Which means that we are getting rid of support for some old versions of Windows. We need to make sure that users have required .Net version installed on their machines prior to release. So we are planning to make a release with the .Net installer first, which will ask users to update. It is planned that next version will have this installer. After that we can proceed with .Net version update.

Proper parameters UI for custom enums, DateTime and Color are planned to be supported. But these tasks are not in the top priority list.

There are no plans yet to introduce new drawing objects. Your feedback on this subject is very welcome. Please tell us what do you want to see here.

Regarding TimeZone of the platform, it's a good idea to add this property and a change event.

Thank you,
Andrey

 

afhacker said:

First thanks for adding this new features but what about community requests? where is multi-symbol backtesting? or different parameter types like Enums, date time picker,...

And is there any property to get a collection of all available symbols? that will be a simple feature to add before releasing the new version of API.

The current API library is based on .Net framework 4 which is obsolete, please update the .Net version to > 4.6 at least.

Another main issue of current API is limited drawing, please improve the API chart drawing feature by adding:

1. Transparency

2. Different shapes drawing

3. Checking current objects on chart and modifying those objects

4. A collection of objects drawn by current indicator or cBot

And please add a property to get the user platform (not system as it's available by .Net) time zone as a .Net TimeZoneInfo object.

Adding all these features will not get much time but I don't know why Spotware is very slow in adding new features?

Multi-symbol backtesting is one of the top suggestions and most voted of the community so please add it!

 


Product Manager of cTrader Automate at Spotware
11 Mar 2018, 19:21#6
Roman_Volodkoposts: 5since: 17 Nov 2016

Good work!

It will be great if you can fix backtesting to show more than 2k deals and to show more logs) Also sometimes when there are a lot of deals in backtesting, it's not showing after backtesting stop. 

09 May 2018, 22:14#7
PapaGohanposts: 6since: 01 Mar 2018

Hey great work! There is no t70 tick option though! The list shows 60, 80, 90!! The one I wanted to use is actually t70, is there any chance on adding this before the release?

24 May 2018, 23:58#8
leohermosoposts: 20since: 31 Jan 2016

And when it is going to be released? 

25 May 2018, 12:35#9
Panagiotis Charalampousposts: 1484since: 13 Jan 2017

Hi all,

Hopefully by the end of next week all brokers should have cTrader 3.0.

Best Regards,

Panagiotis


Head of Community Management at cTrader
19 Jul 2018, 17:32Editor Settings#10
lavio@gigalink.com.brposts: 67since: 11 Jul 2017

In version 3, Calgo was integrated with CTrader. Ok... however:

1) Where are the editor settings? The default changes when saving the code format to a fixed one I hate, not very useful for many users. And I cannot change it to unselect the "auto formatting" dumb option.

2) The integrated version of Calgo has a huge problem: the optimization is now MUCH SLOWER (3x to 10x) than when the calgo executable was independent.

It is so slow that I was forced to change from tick backtests and optimizations to the M1 simulation. And this is VERY BAD !!

In fact, EVERYTHING in the "automate" section of the new CTrader 3 is VERY SLOW. Too much slow. Take attention to this guys, because it is tottaly unfeasible to work that way at a point that can force people go to other plataform. I suggest strongly to offer a Calgo independet version to those who work a lot with backtests and optimizations. I think this is a must.

3) After you optimize, the backtest does not run. Try to "apply" one optimization parameters set to the robot and then try a backtest. It does not run. You need to exit the ctrader/calgo program to make it work again on that instance.

4) The "play" buttons for backtesting and optimization does not show when it is working, active, or not. There are times you click on the button, things do not work and you do not know what is going on... you need to click again and again to be sure.

5) And old issue not related top the version 3: I already used Ninja and MT... and they do implement a true optimization algorithm. But CAlgo seems to choose the parameters randomly. Certainly it is NOT an optimization clever algorithm. In general, the optimization process is a VERY WEAK feature that lacks a better implementation in CTrader, specially when you compare it to other plataforms like MT and Ninja.

Thanks, Lavio