Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
So I've been trying to code my own version of a stochastic crossover so I have more control over it. Below is my code but it's not working quite like the one that's already built into the system.
I'm trying to do this so I can get a signal on a 2 data chart (Stochastic is meant for Data2), but not having to wait until the close of Data2 to actually get the stochastic signal.
Please let me know if you think I'm missing something on the below code. Thanks!
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
The calculations are a little screwy, and I'd also like to make the 14-period input a variable. However, when trying to make it an input, I get a "Wrong Expression" error after trying to compile the code.
(PercentK_data2 ((C of data2 - Lowest (L of data2,14)) )
I would suggest to start with making the code easier to read and to maintain i.e. not trying to put the whole code computations into one input and variable, but instead by using several variables that you compute within your code (and not on declaration). The issue you might run into otherwise is that the variable keeps a static value, although you think it's dynamic.
A good way to verify this is by printing or plotting the actual value for input and variable in it's current form.