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 copy and pasted your Add(PeriodType.Custom5, 004008002); into one of my strategies and it compiled without error. So, there must be something outside of the initialize method causing this error. So, without having your code I can't really go any further. I think your error said something about slope. do you calculate slope somewhere in your code?
As I said the Add() statement COMPILES OK but gives run time error:
**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()
**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()
“Everything is hard before it is easy”
~ Johann Wolfgang von Goethe
**NT** Failed to call method 'Initialize' for strategy 'RangeChartSlopes/6b7d4915312c43ab884f55c1706c5d1a': Please use the alternate method 'AddRenko()' instead of Add()
Are you sure that error isn't referencing a different strategy vs the one you are editing?
I also add, make sure you don't have other (imported) bar types that may be using Custom5. Check your imported bar types source code.
I have now made a new, very stupid-simple strategy just to try the Add() statement. It does nothing more than paint a diamond when two MA's cross. Then, I inserted the Add(PeriodType.Custom5, 004008002); It compiled and it ran! So from this I can only deduce that the problem lies with my original strategy which is more complex using 4 time frames. It is important to note that the original strategy executed just fine before I added the 'Custom5'. Now I need to painfully strip away and comment out small layers of code until I find what broke it. If there is a faster way, I don't know about it since I am not that experienced. Thank you all who made suggestions.
The bottom line is that the Add(PeriodType.Custom5, 004008002); statement is the correct one.
“Everything is hard before it is easy”
~ Johann Wolfgang von Goethe
The problem for me mostly shows up in market replay when the charts just won't load. Occasionally the same occurs when connecting to the live market. I can see the processors grinding away like mad for quite some time and eventually, if I'm lucky, the charts will show up, with literally 1000's of tic marks. I've also seen where the opening session bar has been one huge bar. So I suspect the problem to be with the way the bartype is handling the first bar of session. I've looked at the code but it is beyond my current skill level. Not sure if it makes a difference but I am using CQG data and looking at TF, 6E, 6J typically. My charts are all in the 2 - 5 days of data. The Unirenko settings I'm using are: T1R19010, T1R11O5 and T1R7O3.
So as you might suspect I am sitting here waiting for the charts to load, still not loaded and i am slow typist!
I've gone through deleting workspaces and rebuilding them. I've tried deleting the database itself. I've tried deleting replay data and redownloading but have yet to find a consistent way to work around the problem. So it would be nice if the problem could be fixed to begin with. I'd be willing to participate in a test if it would help.