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)
My apologies if this is too basic a question, but I'm using 2 data streams (SPY & $VIX.X) on a chart & tried to add a new strategy that I developed. When I do that, it goes into a loop for a while and then the strategy gets turned off. Clearly TS doesn't like something in my strategy code. It's very simple. Here's the relevant portion:
The print statement does not appear at all, so it appears to be bombing out on the TLSlopeEasy statement. When I run this strategy on a chart with a single symbol and remove Data2 from the code above, it works as expected. What am I doing wrong?
Can you help answer these questions from other members on NexusFi?
Your code works on my end, but one thing you might want to look into is how to assign variables and functions to a specific datastream. You can even find examples here on futures.io using the search function.
Do you receive an error message? If so, what does it say exactly?
I don't get an error message. The cursor changes to the circular one (indicating that it's working) and then after a while it disappears and my strategy is automatically turned off. My understanding is that I'm passing the correct datastream to the code, so I'm baffled as to why I see this strange behavior.
Okay, I've figured out the problem. In my <do something> section of the code I had turned on IntraBarOrderGeneration to true. TS doesn't like that when there are multiple data streams on a chart. Not sure why. I removed that and it works fine.