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)
I'm trying to develop an indicator that would calculate over multiple data series.
The main issue I'm having here is that after some time the indicator freezes and not only the indicator, but the whole application. Seldom it recovers from the frozen state, but most of the time it doesn't.
I can't see what I'm doing wrong.
Here's the indicator's Initialize() code:
and this is the OnBarUpdate() code:
Nothing too fancy, few lines of simple code.
I did try on a different PCs, and it seems that CPU speed and available memory do not affect much. In fact, memory consumption is pretty negligible.
Can you help answer these questions from other members on NexusFi?
Only thing I see is that you are pulling second data. I would have the input the same as the time frame you are trading off of, so if you are trading using a 5-minute chart, then try using 5-minute data as the input. I believe this will lessen the load and not have any effect on what you are seeing. If that doesn't help or you are using a second chart to trade and need second input, then try loading fewer days.
Thanks for the post, vegasfoster.
All data series have the same time-frame with the series on the chart. As of loading fewer days, it helps for some time, but eventually the result is the same.
@Zondor: BIP is not required. I do not systematically use it for my MTF indicators as it introduces a lag. We can discuss this via private message, if you are interested.
I cannot see any real problems with your code. I have just produced a small MTF indicator, which is attached, and which runs well and without any problems on my side. It basically uses your code.
The only thing that I have added is a check for CurrentBars[0], which represents the primary bar series of the chart.
Maybe you are running into trouble because you have a slow internet connection. The indicator that I have attached is running well and without any problems here.
Zondor, Fat Tails - many thanks for your feedback!
@Zondor: Fat Tails is right, using BIP gave the same result. Plus, it changes the logic a bit.
I did use try-catch though, as you've suggested to catch possible exceptions (not that I expected any, just to be sure) - none.
@Fat Tails: looked at your indicator - yeap, pretty close. I'm puzzled why your code works all right and mine doesn't... May be it's because you've limited the MaximumBarsLookBack?
My connection is rather fast, never had related issues before.
I'm converting indicators from EasyLanguage/PowerLanguage to Ninja and the opposite.