Overall Statistics
Total Trades
6
Average Win
0.64%
Average Loss
0%
Compounding Annual Return
140.731%
Drawdown
0.900%
Expectancy
0
Net Profit
1.862%
Sharpe Ratio
8.798
Probabilistic Sharpe Ratio
86.999%
Loss Rate
0%
Win Rate
100%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0.103
Annual Variance
0.011
Information Ratio
8.798
Tracking Error
0.103
Treynor Ratio
0
Total Fees
$6.00
Estimated Strategy Capacity
$16000000.00
Lowest Capacity Asset
ADSK R735QTJ8XC9X
#region imports
from AlgorithmImports import *
#endregion
# How to make 10 minutes EMA's ?

EMA_5 = 5; EMA_13 = 13; EMA_34 = 34; EMA_50 = 50; SMA_60 = 60; RDV = 14;
STOCKS = ["TSLA", "MSFT", "ADSK", "UPST" ];
        
class TemMinutes_EMA(QCAlgorithm):
   
    def Initialize(self):
        self.EnableAutomaticIndicatorWarmUp = True
        
        #Broker settings
        self.SetCash(25000)  
        self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin)
        
        self.UniverseSettings.DataNormalizationMode = DataNormalizationMode.SplitAdjusted
        
        #Backtest settings
        self.SetStartDate(2022, 5, 25)
        self.SetEndDate(2022, 6, 1)
     
        # Resoultion
        res_minute = Resolution.Minute
        res_hour = Resolution.Hour
        res_daily = Resolution.Daily
        
        #EMA setup
        self.ema_5 = {}
        self.ema_13 = {}
        
        # Equities
        self.stocks =  [self.AddEquity(ticker, res_minute).Symbol for ticker in STOCKS]
        
        for sec in self.stocks:
            self.ema_5[sec] = self.EMA(sec, EMA_5, res_hour)
            self.ema_13[sec] = self.EMA(sec, EMA_13, res_hour)
                
    def OnData(self, data):
        if self.IsWarmingUp: return
        
        for sec in self.stocks:
          
            if not (self.ema_5[sec].IsReady) or not (self.ema_13[sec].IsReady): continue
                          
        
            if self.Portfolio[sec].Quantity == 0:
                if self.ema_5[sec] > self.ema_13[sec]:
                    self.MarketOrder(sec, 4, True)

            elif self.Portfolio[sec].Quantity > 0 :
            
                if self.ema_5[sec] < self.ema_13[sec]: 
                    self.Liquidate(sec, "EMA 5 - 13 crossover")