Overall Statistics
Total Trades
3
Average Win
0.00%
Average Loss
0%
Compounding Annual Return
-0.001%
Drawdown
0.000%
Expectancy
0
Net Profit
-0.001%
Sharpe Ratio
-0.103
Probabilistic Sharpe Ratio
11.198%
Loss Rate
0%
Win Rate
100%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-0.625
Tracking Error
0.303
Treynor Ratio
-1.502
Total Fees
$3.00
class ParticleResistancePrism(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 1, 4)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity('SPY', Resolution.Daily)
        self.bought = False
        
    def OnData(self, data):
        if not self.bought:
            self.bought = True
            
            self.MarketOrder('SPY', 1)
            self.LimitOrder('SPY', -1, 370)
            self.StopMarketOrder('SPY', -1, 366)