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
Tracking Error
0
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
#region imports
from AlgorithmImports import *
#endregion
class EnergeticSkyBlueBuffalo(QCAlgorithm):

    def Initialize(self):
        # In initialize method:
        self.SetTimeZone("Australia/Brisbane")
        self.SetStartDate(2022, 4, 14)  # Set Start Date
        self.SetEndDate(2022, 4, 15)
        self.SetCash(50000)  # Set Strategy Cash
        self.symbol = self.AddForex("AUDUSD",Resolution.Minute, Market.FXCM)
        self.Debug(f"{self.Time} >> Setup Symbol >> {self.symbol.Symbol}")
        
        self.minuteConsolidator = QuoteBarConsolidator(timedelta(minutes=5))
        self.minuteConsolidator.DataConsolidated += self.barSizeMinuteHandler
        self.SubscriptionManager.AddConsolidator(self.symbol.Symbol, self.minuteConsolidator)

        thirtyMinuteConsolidator =QuoteBarConsolidator(timedelta(minutes=30))
        thirtyMinuteConsolidator.DataConsolidated += self.ThirtyMinuteBarHandler
        self.SubscriptionManager.AddConsolidator(self.symbol.Symbol, thirtyMinuteConsolidator)

        self.Consolidate(self.symbol.Symbol, Resolution.Minute, self.MinuteAUDUSDHandler)

    def OnData(self, data: Slice):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
            Arguments:
                data: Slice object keyed by symbol containing the stock data
        '''
        self.Debug(f"OnData: >> {data.Close}")
        self.Log("Additional detailed logging messages")


    def barSizeMinuteHandler(self, sender, consolidatedBar):
        self.Debug(f"{consolidatedBar.EndTime} >> barSizeMinuteHandler >> {consolidatedBar.Close}")
        self.Log(f"{consolidatedBar.EndTime} >> barSizeMinuteHandler >> {consolidatedBar.Close}")

    def ThirtyMinuteBarHandler(self, sender, bar):
        self.Debug(str(self.Time) + " " + str(bar))

    def MinuteAUDUSDHandler(self, consolidated):
        '''This is our event handler for our daily consolidated defined using the Consolidate method'''
        self.Log(f"{consolidated.EndTime} AUDUSD Daily consolidated.")