/// <summary> /// This function will be called after creating /// </summary> public override void Init() { PositionsManager.OnOpen += (p) => { Notification.Print($"Open position Id: {p.ID} OpenOrderId: {p.OpenOrderID}"); if (orderId == p.OpenOrderID) { Notification.Print($"Close position id {p.ID}"); PositionsManager.Close(p); } else { Notification.Print("Position not found"); } }; }