I have a daily scale strategy activated in the Strategy Monitor.
The strategy used to have 4 strategy parameters when it was activated in the Strategy Monitor.
Once I updated the C# code to add new 2 strategy parameters, the scheduled strategy started to fail with the following error in the status.
Restarting WL8 didn't fix the problem, so I inspected the strategy setting and found only 4 strategy parameters listed which is odd because the code has 6 strategy parameters.
So I deactivated and removed the strategy from the Strategy Monitor.
I added it back to activate it again.
Now I see 6 strategy parameters listed in the strategy setting and the problem went away.
The strategy used to have 4 strategy parameters when it was activated in the Strategy Monitor.
Once I updated the C# code to add new 2 strategy parameters, the scheduled strategy started to fail with the following error in the status.
QUOTE:
2024/09/30 13:42:32: Exception running Strategy on : Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
Restarting WL8 didn't fix the problem, so I inspected the strategy setting and found only 4 strategy parameters listed which is odd because the code has 6 strategy parameters.
So I deactivated and removed the strategy from the Strategy Monitor.
I added it back to activate it again.
Now I see 6 strategy parameters listed in the strategy setting and the problem went away.
Rename
Not allowing a bug report for an induced error.
If you change the strategy, deactivate it and click "Refresh selected strategies..." for the SM to use the updated code.
If you change the strategy, deactivate it and click "Refresh selected strategies..." for the SM to use the updated code.
Fair enough.
Fortunately, today is not the day for my strategy to generate a signal and I now understand how to deal with it, I have no problem.
I just wanted to report the issue because other people may run into the problem.
Fortunately, today is not the day for my strategy to generate a signal and I now understand how to deal with it, I have no problem.
I just wanted to report the issue because other people may run into the problem.
QUOTE:After re-reading, I'm going to see if I can make that happen because a restart and loading the workspace should have used the updated strategy. I don't know how it could be otherwise.
Restarting WL8 didn't fix the problem,
Yah, I can't make that happen even trying. There's nothing about this report that makes sense to me. Even if the Strategy running in SM was somehow recompiled to be aware of new Parameters (the only way I know of is by deactivating and hitting the Refresh), it wouldn't have affected the parameter indices of the original.
It's 100% more likely that the original strategy was affected by a new position (or something dynamic like that) that happened at run time.
It's 100% more likely that the original strategy was affected by a new position (or something dynamic like that) that happened at run time.
Your Response
Post
Edit Post
Login is required