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.87 Tracking Error 0.125 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
# region imports from AlgorithmImports import * import math # endregion class WellDressedBrownCrocodile(QCAlgorithm): def Initialize(self): self.SetSecurityInitializer(lambda x: x.SetDataNormalizationMode(DataNormalizationMode.Raw)) self.SetStartDate(2022, 12, 16) self.SetEndDate(2023, 1, 6) self.SetCash(100000) self.fx = self.AddForex("EURUSD", Resolution.Hour) self.symbol = self.fx.Symbol self.highList = [] self.lowList = [] self.highValue = 0 self.lowValue = 0 self.pphl = self.PPHL(self.symbol, 10, 10) self.Schedule.On(self.DateRules.EveryDay(self.symbol), self.TimeRules.At(14, 0, 0), self.ValuesTest) def ValuesTest(self): self.Debug(str(len(self.highList)) + " = length of high list") self.Debug(str(len(self.lowList)) + " = length of low list") self.Debug(self.highValue) self.Debug(str(self.lowValue) + " = low value") def OnData(self, slice: Slice) -> None: if not self.pphl.IsReady: return price = self.Securities[self.symbol].Price self.highList = self.pphl.GetHighPivotPointsArray() if len(self.highList) > 0: self.highValue = self.highList[0] self.lowList = self.pphl.GetLowPivotPointsArray() if len(self.lowList) > 0: self.lowValue = self.lowList[0]