In this algo (enhanced by @ Adams and others), I am trying to find the daily opening price, current high price, Current low price and Yesterday's close price. Although my style so far (lines 82 - 85; the very bottom of the code) are logging some prices on live paper trade and backtest, but the prices seem to be off when I compare to the actual nasdaq, Nyse values or IBKR.
Does anyone know how to get the following:
- Open price (price at 9:30AM ET time) on each trading day
- Current high and low prices (this algo runs every 1 minute, so these price will likely change every so often throughout the day)
- Yesterday closing price for each stock
See attached algo for what I have attempted so far
I appreciate any suggestions
Vladimir
Lemuel Mwangi
--> I am trying to find the daily opening price, current high price, current low price and yesterday's close price.
We can't get High, Low, Close prices of the daily bar until it closes.
Using self.History, self.Identity we can get previous bar High, Low, Close prices.
“Today's Open” may help you get current bar Open.
If you are satisfied with my answer, please accept it and don't forget to like it.
Lemuel Mwangi
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!