My understanding is that WL currently performs the following looping structure when running on a watch list:
for all symbols in the watch list
for all bars in the time interval
execute the strategy
I'm wondering if it is possible to write a strategy that reverses the order of these loops so that I have something like the following:
for all bars in the time interval
for all symbols in the watch list
execute the strategy
My motivation is the following. I am assuming that if I have a large enough watch list, there might be trade signals on several symbols in my watch list and because of money management risk rules, I might only be allowed to execute on a few of those trade signals. In that scenario, it would be nice to be able to compare the available trades against some criteria such as a risk/reward ratio in order to choose the most attractive trades. I suppose that capability is possible if not using the automated trading features of WL. But it would be nice to have this ability for automated trading and back testing.
Is something like this currently possible with WL?
Thanks,
Dave
Size:
Color:
QUOTE:
In that scenario, it would be nice to be able to compare the available trades against some criteria such as a risk/reward ratio in order to choose the most attractive trades.
Why not set up a different Position priority for that?
QUOTE:
My understanding is that WL currently performs the following looping structure when running on a watch list:
In case you're interested, here's how the order can be changed:
WealthScript Techniques | Portfolio-wide conditions in WL5 Wiki
Size:
Color:
I'm not sure what you mean regarding "different Position priority". I'm still very new to the whole idea of developing programmable strategies.
I'll take a look at your WL5 Wiki reference.
Thanks,
Dave
Size:
Color:
Assigning a value to the Position.Priority property gives is used for prioritizing some trade signals when there's lack of capital. Please see QuickRef and WS Programming Guide for more information and examples.
Size:
Color:
Thanks. I'll check that out. I took a look at the Wiki reference you gave above and that looks promising. I will be investigating that in more detail as soon as I get past some of my other issues.
Size:
Color: