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?
The following user says Thank You to MWinfrey for this post:
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 following user says Thank You to profits for this post:
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.
The following user says Thank You to Tasker_182 for this post: