Hello everyone,
I am new to using Quantopian's back testing function.
I'm currently trying to write a code that:
1.) Purchases the stock with P% of my capital when the stochastic value is below X
2.) Sells all my positions of the stock when the stochastic value is above Y
I looked into some of the posts that use stochastics to write a strategy, however they didn't quite answer the questions I had.
How should I change the code so that it would apply #1 and #2?
Also:
3.) Is it possible to use Yahoo Finance pricing instead of the builtin price data?
4.) Is it possible to redefine the stochastic equation so that the stochastic value is closer to that of other sources (e.g. Yahoo, Tradingview, etc.)?
Thanks in advance!
Original code from : https://www.quantopian.com/posts/trading-on-stochastic-indicators