The following is my short straddle setup for my short straddle strategy how do I convert it into code?
If Implied volatility is lower than 50:
SELL 1 share when Nth candle(Close,5min,2) higher than 0.0 at 5min candle interval using candlestick chart. Enter trade between 09:00 to 23:59 and BUY 1 share when Nth candle(Close,5min,72) higher than 0.0 or at stop loss % of 25 or target profit % of 45 at 5min candle interval using candlestick chart.
If Implied volatility is higher than 50:
BUY 1 share when Nth candle(Close,5min,2) higher than 0.0 at 5min candle interval using candlestick chart. Enter trade between 09:00 to 23:59 and SELL 1 share when Nth candle(Close,5min,72) higher than 0.0 or at stop loss % of 25 or target profit % of 45 at 5min candle interval using candlestick chart.
Mak K
Hi Anish,
Don't have much time right now but maybe try reading this post;
https://www.quantconnect.com/forum/discussion/5667/security-implied-volatility-calculation/p1
It shows you how to access implied volatility.
Some other questions;
How good is your knowledge of coding/python?
  If you don't know much do you want me to send you appropriate learning materials?
I will get back to you in more detail (attached backtest) once I have more time,
Â
Thanks!
Â
Anish Adamane
Hey Mak, I have figured out short straddle and right now I am stuck on a condition which needs to be added
Â
If Implied Volatility > 50
Sell SPY Call
Sell SPY Put
Â
Else If:
Buy SPY Call
Buy SPY Put
Â
Anish Adamane
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!