IndicatorScriptBase

IndicatorScriptBase is the default Script Indicator. This class can be inherited and used to create a custom Script Indicator by changing elements of the default script, without having to implement all members of the IndicatorScript-interface.

 public class IndicatorScriptBase : IIndicatorScript
    {
        public virtual string Name
        {
            get
            {
                return "Default empty Indicator-script";
            }
        }

        public virtual IndicatorResult GetResult(IndicatorContext context)
        {
            return IndicatorResult.Stay;
        }

        public virtual void Init()
        {
            //Do nothing
        }

        public virtual int PriceHistoryLimit
        {
            get { return 50; }
        }


        public virtual List<DataSerie> ChartDataSeries
        {
            get { return new List<DataSerie>(); } //Return empty list => no charts
        }

        public virtual List<double> GetChartData(IndicatorContext context)
        {
            return new List<double>(); //Return empty list => no charts
        }

        public virtual List<ScriptParameter> GetParameters()
        {
            return new List<ScriptParameter>(); //Return empty list => no user parameters
        }

        public virtual void SetParameters(Dictionary<string, object> parameters)
        {
            //Do nothing
        }

    }

Last updated