Skip to content

HistoricalTrade.Channel

property · HistoricalTrade · cAlgo.API

DesktopCLICloud

Gets the channel via which the trade was executed in a string format.

Environment behaviour

CLI — works differently. Trades the cBot made carry channel 'cBot Console' instead of the desktop 'cBot cTrader'.

Cloud — works differently. Trades the cBot made carry channel 'cBot Cloud' instead of the desktop 'cBot cTrader'.

Definition

string Channel {get;}
historicalTrade.Channel: str

Returns string

Examples

var trade = History.LastOrDefault();
if (trade != null)
    Print("Last trade channel: {0}", trade.Channel);
if api.History.Count > 0:
    api.Print(f"Last trade channel: {api.History[api.History.Count - 1].Channel}")