Hello Team,
I'm very interested in how the Parabolic Stop and Reverse indicator works. Does anyone have a simple algorithm they can share showing how to use it to do a simple buy when the trend is going up, and sell when it's going down? Hopefully in Python! :P
I found a few on the forums, but they were before the Indicator was added to core QC.
This is the Indicator as documented:
self.PSAR('BTCUSD')
var psar = PSAR(Symbol symbol, decimal afStart = 0.02, decimal afIncrement = 0.02, decimal afMax = 0.2, Resolution resolution = null, Func`2[Data.IBaseData,Data.Market.IBaseDataBar] selector = null)
Thanks for the help!
Jing Wu
Hi Drew, see the attached backtest for an algorithm using PSAR with charting system.
Drew Baker
Thanks Jing Wu! This is great to see!
Drew Baker
This would be a good simple algo to add to the examples.
Jared Broad
Feel free to make a pull request Drew Baker! =) The open source drives the examples here in the website too.
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.
Varad Kabade
Hi John Ener,
The PSAR indicator takes in a TradeBar object inside the Update method. To resolve the issue first, we need to create a TradeBar from the tuple and then do the Update. Refer to the following snippet:
Â
Best,
Varad Kabade
Drew Baker
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!