---
id: "T:cAlgo.API.LocalStorageScope"
kind: "enum"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Localstorage/LocalStorageScope/"
---

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

# LocalStorageScope (enum)

Defines the local storage scope.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public enum LocalStorageScope
```

## Examples

C#:

```csharp
LocalStorage.SetString("Last Signal", "Buy EURUSD", LocalStorageScope.Device);
Print("Device scope value: {0}", LocalStorage.GetString("Last Signal", LocalStorageScope.Device));
```

Python:

```python
api.LocalStorage.SetString("Last Signal", "Buy EURUSD", LocalStorageScope.Device)
api.Print(f"Device scope value: {api.LocalStorage.GetString('Last Signal', LocalStorageScope.Device)}")
```

## Values

- `LocalStorageScope.Instance` — The value is stored and can be accessed only by a specific running instance of a cBot/Indicator.
- `LocalStorageScope.Type` — The value is stored and can be accessed by all running instances of one or more cBot(s)/Indicator(s).
- `LocalStorageScope.Device` — The value is stored and can be accessed by all running instances of a cBots/Indicators on this device.

