Overall Statistics
//
//  QCU Hello World Example with F# - Basic Template
//  Create a basic template to load the QC API. 
//

open QuantConnect.Data

type BasicTemplateAlgorithm() = 

    //Reuse all the base class of QCAlgorithm
    inherit QCAlgorithm()
    
        //Implement core methods:
        override this.Initialize() =
            this.SetCash(100000)
            this.SetStartDate(2013, 10, 7)
            this.SetEndDate(2013, 10, 11)
            this.AddEquity("SPY", Resolution.Second) |> ignore

        //TradeBars Data Event
        member this.OnData(bar:TradeBars) = 
            
                if not this.Portfolio.Invested then 
                    this.SetHoldings(this.Symbol("SPY"), 1)
                else 
                    ()