Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
8.893%
Drawdown
15.400%
Expectancy
0
Net Profit
8.914%
Sharpe Ratio
0.57
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.237
Beta
-9.989
Annual Standard Deviation
0.136
Annual Variance
0.018
Information Ratio
0.452
Tracking Error
0.136
Treynor Ratio
-0.008
Total Fees
$0.00
class fxBidAskExample(QCAlgorithm):

    def Initialize(self):
        
        self.SetStartDate(2017, 6, 1)
        self.SetEndDate(2018, 6, 1)
        self.SetCash(5000)
        
        self.forex = self.AddForex("EURUSD", Resolution.Daily, Market.Oanda)

        IndicatorPlot = Chart("Trade Plot")
        IndicatorPlot.AddSeries(Series("Bid Open", SeriesType.Line, 0))
        IndicatorPlot.AddSeries(Series("Ask Low", SeriesType.Line, 0))
        
        
    def OnData(self,data):
        
        price = self.Securities['EURUSD'].Price
        if not self.Portfolio.Invested:
            self.MarketOrder(self.forex.Symbol,10000)
            
        bid_open = data["EURUSD"].Bid.Open
        ask_low = data["EURUSD"].Ask.Low
        
        self.Plot("Trade Plot", "Bid Open", bid_open)
        self.Plot("Trade Plot", "Ask Low", ask_low)