Just realised the obvious test is to change to this inside the loop:
Buffer[t] = 0.5;
Now it displays correctly, so my problem was a computation timeout.
But now my new question is: how do I give the OnCalculate computation more execution time in my indicator?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I've written an indicator that displays a signal in a separate window, but it's only displaying for a few hundred bars and then it just stops. Here's my code:
"guess" is my signal function which I want to display in the window.
"max_offset" is how far back the "guess" function needs to look in historical data to display a given point. To display the signal at "t", it needs the OHLC arrays to be at least "t + max_offset" long.
Any insight into why the "guess" signal stops displaying after a certain point?
EDIT: Thought I'd add that "guess" is a very heavy calculation, could this be a timeout issue?