Skip to content

Position.Comment

property · Position · cAlgo.API

DesktopCLICloud

Comment can be used as a note for the order.

Definition

string Comment {get;}
position.Comment: str

Returns string

Examples

var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, "myLabel", 20, 40, "Breakout entry");
if (result.IsSuccessful)
    Print("Position comment: {0}", result.Position.Comment);
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "myLabel", 20, 40, "Breakout entry")
if result.IsSuccessful:
    api.Print(f"Position comment: {result.Position.Comment}")