> For the complete documentation index, see [llms.txt](https://help.signals.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.signals.network/framework-documentation/untitled/properties/position.md).

# Position

Object that reveals information about a current open position of the strategy.

#### Properties

| Name            | Type                  | Description                                                                                                                                                    |
| --------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `InPosition`    | bool                  | Returns `true` if the strategy is in position, `false` otherwise.                                                                                              |
| `PositionType`  | StrategyPositionType? | If the strategy is in position, it returns `StrategyPositionType` enum which can be `Long` or `Short`. If it is not in position, the `PositionType` is `null`. |
| `ExecutedPrice` | double?               | Returns the price of the asset at which the position was opened. If the strategy is not in an open position, it returns `null`.                                |
| `ExecutedTime`  | datetime?             | Time when the position was opened. If the strategy is not in an open position, it returns `null`.                                                              |

{% tabs %}
{% tab title="Bacis example" %}

```csharp
// If strategy is in position then log position details
if (Position.InPosition)
{
    Log("Open position: " + Position.PositionType + ", " + Position.ExecutedTime + ", " + Position.ExecutedPrice);
}
```

{% endtab %}

{% tab title="Complete example" %}

```csharp
using Signals.DataSeries.Bars;
using Signals.Framework;
using Signals.Indicators.SMA;

public class MyStrategy : SingleMarketStrategy
{
    private Bars hourlyBars;
    private SMA smaSlow;
    private SMA smaFast;

    private int fast = 10;
    private int slow = 25;

    public override void Setup(DataMarketplace data, IndicatorsMarketplace indicators)
    {
        hourlyBars = data.Bars(BarPeriodType.Hour, 1).WithOffset(25);
        smaSlow = indicators.SMA(slow).OnSeries(hourlyBars.Close);
        smaFast = indicators.SMA(fast).OnSeries(hourlyBars.Close);
    }

    public override void RegisterActions()
    {
        OnUpdateOf(hourlyBars).Do(() =>
        {
            // If not already in position and condition is met then enter position
            if (!Position.InPosition && smaFast.Value > smaSlow.Value)
            {
                EnterLong();
            }
            // If already in position and condition is met then exit position
            else if (smaFast.Value < smaSlow.Value && Position.InPosition)
            {
                ExitLong();
            }
        });
    }
}
```

{% endtab %}
{% endtabs %}
