♥ 0 |
I know you made a few posts and videos on custom watchlists, but I am having trouble being able to order my watchlist based on a Fast Stochastics crossover within 2 periods. I am not having trouble being able to put the Fast Stochastics’ value on one of my watchlist columns. I am having trouble with having a column for Fast Stochastics crossover within 2 periods.
P.S. The crossover I am looking for is the FastK crossing over the FastD
Marked as spam
|
Private answer
For this answer I copied the code from the built in study, StochasticFast. I then modified the code to work in a watchlist. I added several lines of code to look for FastK crossing above FastD two bars ago. I added tests to check that the FastK is still above FastD two bars later. A positive result prints a value of +1. Once you get to the third and consecutive bars the signal returns to -1. Be sure to up-vote any answers that best solve your question. The code is posted below. Please leave comments if you need any further explanations or adjustments.
Marked as spam
|
|||
Private answer
Hi Pete , I have a challenge somewhat similar to the one listed above with two stochastics. I plot two full stochastics with different parameters in the same frame on one of my charts. I would like to calculate the value difference between the %K of one stochastic and the %D of the other. Ideally, I’d like the resulting value in a watchlist. I have NO coding skill so would consider a reasonable fee for the effort. Thank you Marked as spam
|
Please log in to post questions.
I think I understand but let me state this in different terms to be sure. You want to be able to sort the watchlist so that those stocks who’s FastK has crossed above the FastD within the last two bars appear at the top of the list. Why didn’t you post your code? That would have really enhanced the learning opportunity for other viewers.
Yes, you are understanding correctly. I didn’t have any code for this. I just clicked on my watchlist and clicked ”customize” then I added StochasticsFast.