Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-2.402
Tracking Error
0.123
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
# Schaff Trend Cycle (STC)

class CustomIndicatorAlgorithm(QCAlgorithm):
    
    def Initialize(self):
        self.SetStartDate(2021, 1, 1) 
        self.SetEndDate(2021, 7, 2)   
        self.stock = self.AddEquity('SPY', Resolution.Daily).Symbol
        self.SetWarmUp(70, Resolution.Daily)
        
        self.stc = self.STC(self.stock, 10, 23, 50, MovingAverageType.Exponential, Resolution.Daily)
        self.sma_stc = IndicatorExtensions.SMA(self.stc, 3)

    def OnData(self, data):
        if self.IsWarmingUp or not self.stc.IsReady: return
    
        self.Plot("Schaff Trend Cycle", "STC", self.stc.Current.Value)
        self.Plot("Schaff Trend Cycle", "sma_STC", self.sma_stc.Current.Value)
        self.Plot("Schaff Trend Cycle", "UB", 75)
        self.Plot("Schaff Trend Cycle", "LB", 25)