public void HistSeriesTest()
 {
     DataSeries ds = null; // TODO: Initialize to an appropriate value
     double fastPeriod = 0F; // TODO: Initialize to an appropriate value
     double slowPeriod = 0F; // TODO: Initialize to an appropriate value
     double signalPeriod = 0F; // TODO: Initialize to an appropriate value
     string name = string.Empty; // TODO: Initialize to an appropriate value
     MACD target = new MACD(ds, fastPeriod, slowPeriod, signalPeriod, name); // TODO: Initialize to an appropriate value
     DataSeries actual;
     actual = target.HistSeries;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #2
0
 public void SignalSeriesTest()
 {
     //application.MarketData market = new application.MarketData(AppTypes.TimeRanges.Y1, AppTypes.TimeScaleFromType(AppTypes.TimeScaleTypes.Day),"SSI");
     application.MarketData stockData = new application.MarketData(AppTypes.TimeRanges.Y1, AppTypes.TimeScaleFromCode("D1"));
     DataSeries ds = null; // TODO: Initialize to an appropriate value
     double fastPeriod = 12; 
     double slowPeriod = 26; 
     double signalPeriod = 9; 
     string name = string.Empty; // TODO: Initialize to an appropriate value
     MACD target = new MACD(ds, fastPeriod, slowPeriod, signalPeriod, name); // TODO: Initialize to an appropriate value
     DataSeries actual;
     actual = target.SignalSeries;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #3
0
        public static MACD Series(DataSeries ds, double fastPeriod, double slowPeriod, double signalPeriod, string name)
        {
            //Build description
            string description = "(" + name + "," + fastPeriod.ToString() + "," + slowPeriod.ToString() + "," + signalPeriod.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

            if (obj != null)
            {
                return((MACD)obj);
            }

            //Create MACD, cache it, return it
            MACD macd = new MACD(ds, fastPeriod, slowPeriod, signalPeriod, description);

            ds.Cache.Add(description, macd);
            return(macd);
        }
 public void MACDConstructorTest()
 {
     DataSeries ds = null; // TODO: Initialize to an appropriate value
     double fastPeriod = 0F; // TODO: Initialize to an appropriate value
     double slowPeriod = 0F; // TODO: Initialize to an appropriate value
     double signalPeriod = 0F; // TODO: Initialize to an appropriate value
     string name = string.Empty; // TODO: Initialize to an appropriate value
     MACD target = new MACD(ds, fastPeriod, slowPeriod, signalPeriod, name);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Beispiel #5
0
 public static MACD Series(DataSeries ds, double fastPeriod, double slowPeriod, double signalPeriod, string name)
 {
     //Build description
     string description = "(" + name + "," + fastPeriod.ToString() + "," + slowPeriod.ToString() +","+signalPeriod.ToString()+ ")";
     //See if it exists in the cache
     object obj = ds.Cache.Find(description);
     if (obj!=null) return (MACD)obj;
     
     //Create MACD, cache it, return it
     MACD macd = new MACD(ds, fastPeriod, slowPeriod, signalPeriod, description);
     ds.Cache.Add(description,macd);
     return macd;
 }