DataSet Looping Strategies
Author: snout_hound
Creation Date: 4/7/2009 11:45 PM
profile picture

snout_hound

#1
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
profile picture

Eugene

#2
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
profile picture

snout_hound

#3
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
profile picture

Eugene

#4
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.
profile picture

snout_hound

#5
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.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).