Is there anyway to trap a bad signal. Currently if I type in a bad signal name the script stops running. I have several linked charts and they will all abort out and flip to their code page. I then have to reset them all to their chart tab and enter the corrected symbol.
Sometimes WL stops working all together, and hangs. I then have to restart.
Is there some bad symbol protection I can put in?
thxs
RLT
Size:
Color:
Of course the app should not hang just for entering bad symbol - what are the conditions that cause that?
As for protection, you can select the symbol from the Data Tree or take 1 second to verify that you've typed the correct symbol before pressing Enter. What else do you suggest?
Size:
Color:
Did a little testing.
I tested the supplied strategies like T2Trend. When I type in a non-existing symbol like KLK i get a blank chart that states "no data".
With my code, WL5 hangs and stops working. With other code of mine I get errors in the Linear Regression routines. I will do some more exploring.
Size:
Color:
If I enter a bad symbol name, the LinearReg.Series(Close,15) I have in my code errors out.
My question was how can I prevent this from happening (besides typing in the correct symbol). Can I check for a bar count and jump around the statement?
Size:
Color:
QUOTE:
If I enter a bad symbol name, the LinearReg.Series(Close,15) I have in my code errors out.
Most likely, any indicator would error out if there are missing data series to calculate it.
One out of possible ways to trap it could be enclosing the code into a try/catch block:
CODE:
Please log in to see this code.
Size:
Color:
How about -
CODE:
Please log in to see this code.
Incidentally, there is a bug that very intermittently can lead to a crash taht will be corrected in 5.3. It can happen any time the chart is rendered (streaming, pressing Go, changing scales, entering a symbol, etc.) with a
manual drawing object.
Size:
Color: