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)
Please take a look at the code below. I'm working on a multitime frame strategy that tests for some conditions on three different time frames 2/10/60 and then updates a "Score" variable based on the findings.
Rather than update the score and print just one updated number, the output is showing three different scores one for each time frame. When added together they are correct but why are they printing to the output window separately?
I want one updated score that updates at each tick on all time frames at once.
"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Can you help answer these questions from other members on NexusFi?
It looks like I'm going to have to forgo the for loop in favor of using BarsArray references within the primary series. I was hoping to have to avoid this as it means a lot more duplicate code. Thx for the suggestion.
"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Yes, I read through the info on syncing dataseries and was successfully able to sync all the series. 2/10/60 and the daily which I added as well. So far the code looks decent although not nearly as elegant as I had originally wanted. I had originally hoped to find a way to do this while looping through the BarsInProgress using a for loop but it doesn't allow me to do what I want it to do. I'll have to duplicate a lot of code unfortunately but at least it works.
"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
sorry to reply so late...thanx JeremyT for the code. I like the easier way you incremented the variables. I'm using that now thanks to you.
Score += TwoMinScore;
is much better than Score = Score + SomethingElse;
thx!
"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion