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
-0.806
Tracking Error
0.318
Treynor Ratio
0
Total Fees
$0.00
# Chaikin Money Flow Indicator


class ChaikinMoneyFlowIndicator(QCAlgorithm):
    
    def Initialize(self):    

        self.SetStartDate(2020, 1, 2)
        self.SetEndDate(2021, 2, 19)
        self.cap = 100000
        self.SetCash(self.cap)

        self.stock = self.AddEquity('QQQ', Resolution.Hour).Symbol 
        self.PERIOD = 10;
        self.SetWarmUp(self.PERIOD + 1)
        self.cmf = self.CMF(self.stock, self.PERIOD, Resolution.Daily)

        
    def OnData(self, data):
        if self.IsWarmingUp or not self.cmf.IsReady: return

        Chaikin_Money_Flow = self.cmf.Current.Value
        
        self.Plot('Indicator', 'cmf', Chaikin_Money_Flow)
        self.Log(Chaikin_Money_Flow )