> For the complete documentation index, see [llms.txt](https://support.tiger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.tiger.com/english/development-for-tiger.trade-windows/source-examples/stock.md).

# Stock

```
using System.Collections.Generic;
using System.Runtime.Serialization;
using TigerTrade.Chart.Indicators.Common;
 
namespace TigerTrade.Chart.Indicators.Custom.Sources
{
    [DataContract(Name = "StockSourceDemo",
        Namespace = "http://schemas.datacontract.org/2004/07/TigerTrade.Chart.Indicators.Custom.Sources")]
    [IndicatorSource("StockDemo", Type = typeof(StockSourceDemo))]
    public sealed class StockSourceDemo : IndicatorSourceBase
    {
        public StockSourceDemo()
        {
            SelectedSeries = "Close";
        }
 
        public override IEnumerable<string> GetSeriesList()
        {
            return new List<string>
            {
                "Open",
                "High",
                "Low",
                "Close",
                "Median",
                "Typical",
                "POC",
                "Trades",
                "Volume",
                "Bid",
                "Ask",
                "Delta",
                "OpenInterest",
                "OIChange",
                "OIBidChange",
                "OIAskChange"
            };
        }
 
        public override double[] GetSeries(IndicatorsHelper helper)
        {
            switch (SelectedSeries)
            {
                case "Open":
 
                    return helper.Open;
 
                case "High":
 
                    return helper.High;
 
                case "Low":
 
                    return helper.Low;
 
                case "Close":
 
                    return helper.Close;
 
                case "Median":
 
                    return helper.MedianPrice();
 
                case "Typical":
 
                    return helper.TypicalPrice();
 
                case "POC":
 
                    return helper.Poc;
 
                case "Trades":
 
                    return helper.Trades;
 
                case "Volume":
 
                    return helper.Volume;
 
                case "Bid":
 
                    return helper.Bid;
 
                case "Ask":
 
                    return helper.Ask;
 
                case "Delta":
 
                    return helper.Delta;
 
                case "OpenInterest":
 
                    return helper.OpenPos;
 
                case "OIChange":
 
                    return helper.OpenPosChg;
 
                case "OIAskChange":
 
                    return helper.OpenPosAskChg;
 
                case "OIBidChange":
 
                    return helper.OpenPosBidChg;
            }
 
            return null;
        }
 
        public override void CopySettings(IndicatorSourceBase source)
        {
            if (source is StockSourceDemo s)
            {
                SelectedSeries = s.SelectedSeries;
            }
        }
 
        public override string ToString()
        {
            return !string.IsNullOrEmpty(SelectedSeries) ? SelectedSeries : "None";
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.tiger.com/english/development-for-tiger.trade-windows/source-examples/stock.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
