No and no.
No and no.
... - which it doesn't work. too much code (more than 2000 code lines) throws off the while loop ?
hmm... then what can go wrong ? should I use a different location than OnStart() ?
You probably need to be more specific... What exactly is "doesn't work"? Did it Crash? Any error message? Or just hang there?
One very common issue with while loop is the end condition - make sure you have one that will become true at some point in time...
You probably need to be more specific... What exactly is "doesn't work"? Did it Crash? Any error message? Or just hang there?
One very common issue with while loop is the end condition - make sure you have one that will become true at some point in time...
While (1==1) - or while (1>0) - i need the loop to just run all the time... and yes, it was working with less code... after I have placed more code - it stopped working.
hope this answers... not sure what to do...
While (1==1) - or while (1>0) - i need the loop to just run all the time... and yes, it was working with less code... after I have placed more code - it stopped working.
hope this answers... not sure what to do...
Why? Nothing is changing. Return from OnTick/OnCalculate and wait to be called when something does change.
A loop body with 2000 lines is difficult to read and maintain. Even if only you are going to use it and no one else participates. Think what will happen when you didn't work with this code for half a year and then come back to reuse it. It would be much easier to maintain if you break the block into smaller pieces and make functions from it. Btw 'while(true)' is commonly used.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
friends, i have wrote a bunch of code and now i trying to capture it in a while loop... - which it doesn't work. too much code (more than 2000 code lines) throws off the while loop ? it is OnStart().
the code has a bunch of lines in a for loop and if i put a if condition after that - with too many conditions - is not working either...
i am in serious need for help. the code compiles correctly... but is not working for the while and if conditions...
if i can speak with someone on private i would be glad too... public answer works as well.
i think my question is if too many code lines may affect the execution of the while loop... or the ifs are affected by too many conditions...
While (1==1) - or while (1>0) - i need the loop to just run all the time... and yes, it was working with less code... after I have placed more code - it stopped working.
appreciated dear friends...