---
id: "P:cAlgo.API.CustomSymbolSentiment.BuyPercentage"
kind: "property"
type: "T:cAlgo.API.CustomSymbolSentiment"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/BuyPercentage/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# CustomSymbolSentiment.BuyPercentage

Member of [CustomSymbolSentiment](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolSentiment/index.md).

## BuyPercentage

Gets / sets buy percentage.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
double BuyPercentage {get; set;}
```

Python:

```python
customSymbolSentiment.BuyPercentage: float
```

### Returns

`double` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.Sentiment.BuyPercentage = 55;
Print("Buy percentage: {0}", customSymbol.Sentiment.BuyPercentage);
```

Python:

```python
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.Sentiment.BuyPercentage = 55
api.Print(f"Buy percentage: {customSymbol.Sentiment.BuyPercentage}")
```

