Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return -38.806% Drawdown 1.700% Expectancy 0 Net Profit -0.365% Sharpe Ratio 0.097 Probabilistic Sharpe Ratio 0% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.162 Beta -0.703 Annual Standard Deviation 0.135 Annual Variance 0.018 Information Ratio 0.801 Tracking Error 0.327 Treynor Ratio -0.019 Total Fees $0.00 |
class ModulatedCalibratedProcessor(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 11, 10) # Set Start Date self.SetCash(100000) # Set Strategy Cash self.symbol = self.AddCfd("XAUUSD", Resolution.Minute, Market.Oanda).Symbol self.max = Maximum(60) def OnData(self, data): if not data.ContainsKey(self.symbol) or data[self.symbol] is None: return if self.max.IsReady: if data[self.symbol].Close > self.max.Current.Value: self.SetHoldings(self.symbol, 1) self.Plot("Custom", "Max", self.max.Current.Value) self.Plot("Custom", "Close", data[self.symbol].Close) self.max.Update(data.Time, data[self.symbol].High)