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.155
Tracking Error
0.174
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
# region imports
from AlgorithmImports import *
# endregion

class MuscularFluorescentOrangeGorilla(QCAlgorithm):

    def Initialize(self):

        # Set Start Date
        self.SetStartDate(2022, 6, 22)

        # Set Strategy Cash
        self.SetCash(100000)

        # Add future
        future = self.AddFuture(Futures.Energies.CrudeOilWTI, leverage = 50)
        future.SetFilter(0, 180)
        self.future_symbol = future.Symbol

    def OnData(self, data: Slice):
        
        # If not invested
        if not self.Portfolio.Invested:

            # Buy
            chain = data.FuturesChains.get(self.future_symbol)
            if chain:
                for contract in chain:
                    self.MarketOrder(contract.Symbol, (self.Portfolio.Cash * 50 / (self.Securities[contract.Symbol].Close * 1000)))
                    break