How to allocate more stack space
Forums › ProRealTime English forum › ProRealTime platform support › How to allocate more stack space
- This topic has 4 replies, 4 voices, and was last updated 7 years ago by David.
-
-
05/24/2017 at 9:29 PM #36597
Hi All,
I have created an indicator with a lot of moving averages and I find I am getting an “out of stack space” error from PRT.
As the Java application is launched by the web, (in my case on linux by javaws) I cannot pass it any parameters to increase the stack size.
Anyone have any idea on how to give the Java app more stack/heap size?
Cheers
06/26/2017 at 10:11 AM #3905106/26/2017 at 10:27 AM #39053My platform being in french, I can’t be sure 100% it’s the same message I had as yours, but it looks likely. If it is the same message I had, then it means your number of return variables is higher than the platform maximum, which, if my memory serves correctly, is 63.
So if your “lot of moving averages” bring your total number of variables in the “return” line of your personal indicator to for example 65, maybe you can find 2 variables you don’t really need in your “return line”, or that could be drawn in another way (example: using a drawhline command rather than returning a variable for an horizontal line in the return variables list), and get rid of them to get your number of variables to 63 or less, and it should work from there.
If it is indeed this problem and you need more than 63 rather than sacrificing a few of them, then sorry I haven’t found any way to increase this max number to more than 63.
06/27/2017 at 8:45 PM #39251Hi,
Yes, it looks like the amount of return variables is the issue, 60 works, but 70 does not. I don’t have a choice in returning the variables for what I want to do.
…. but I can cope with 60 moving averages 🙂
Nicolas, does the premium version increase the number of variables you can return?
Thanks
07/14/2017 at 2:46 AM #40603G’day bmentik (sorry not addressing your direct question), if you use a lot of moving averages (or too many indicators) it will mean you are over optimizing/curve fitting on past data and you will make your system not profitable in the future but I’m always happy to be corrected.
-
AuthorPosts