Overall Statistics
Total Trades
189
Average Win
0.26%
Average Loss
-0.10%
Compounding Annual Return
-87.361%
Drawdown
7.600%
Expectancy
-0.807
Net Profit
-7.102%
Sharpe Ratio
-4.521
Probabilistic Sharpe Ratio
0.000%
Loss Rate
95%
Win Rate
5%
Profit-Loss Ratio
2.62
Alpha
-0.743
Beta
-0.371
Annual Standard Deviation
0.179
Annual Variance
0.032
Information Ratio
-2.935
Tracking Error
0.334
Treynor Ratio
2.175
Total Fees
$0.00
Estimated Strategy Capacity
$1400000.00
class DeterminedYellowGreenBull(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 6, 19)
        self.SetEndDate(2020, 7, 1)
        self.SetCash(100000)
        self.py = self.AddForex("AUDNZD", Resolution.Minute)
        self.SetWarmup(600)
        
        self.alma_fast = self.ALMA("AUDNZD", 240, Resolution.Minute)
        self.alma_slow = self.ALMA("AUDNZD", 350, Resolution.Minute)
        self.baseline = self.EMA("AUDNZD", 598, Resolution.Minute)
        
    def OnData(self, data):
        
        if not self.baseline.IsReady:
            return
        
        self.Plot("Custom", "alma_fast", self.alma_fast.Current.Value)
        self.Plot("Custom", "alma_slow", self.alma_slow.Current.Value)
        
        
        if self.Securities["AUDNZD"].Price >= self.baseline.Current.Value:
            if self.Portfolio.Invested:
                self.Liquidate()
            return
        
        if not self.Portfolio.Invested:
            if self.alma_fast.Current.Value < self.alma_slow.Current.Value and self.py.Close < self.alma_slow.Current.Value:
                self.SetHoldings("AUDNZD", -2)