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);
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:
Added property Account.AccountType. It can be Netted or Hedged.
Now you can get multiple tiers of Symbol leverage using Symbol.DynamicLeverage.
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
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
Added access to Symbol trading session. You can get sessions using Symbol.MarketHours.
Now you can get current connection status to the server using Server.IsConnected property.
Also added events Server.Connected and Server.Disconnected.
Added new trading events:
PendingOrders.Cancelled with cancellation reason
Also Position.Closed event now contains close reason.
I've played around in c# and cAlgo.api version 1 or 2.
Is it possible to get a download of the 3.0 version?
Would love to get my hands dirty again with this good suff.
Thank you Pepper Team, you do a great Job, I am the happiest man ever with Ctrader. i d love you to give some support on Ctrader+Python, it turns out that Convolutional Neural nets performs decently predicting market direction, not the price, i mean feeding the net with multivariate time series(OHLC volume others....some of them). Bottom line, if you could give some help, cz algorithmic trading doesn not work, i mean pure.....AI plus some Algo much better. Thank you you are the best!