Hi,
I want to trade the signals from one symbol on all other symbols in the DataSource, too.
What would be the easiest way to adapt the code to accomplish this?
Only way that comes to my mind is to have the symbol that generates the trading decisions to get by GetExternalSymbol.
However, this would mean that I would have to re-write the whole script. Maybe there is a more elegant solution?
Size:
Color:
Global memory?
Size:
Color:
Can you elaborate a bit more on the idea?
Lets take the following simple MA crossover code:
CODE:
Please log in to see this code.
I have a DataSource with three symbols. All the entry signals of symbol1 should generate entry signals on the other symbols in the DataSource. I dont have a clue how to do this with Global Memory.
Size:
Color:
Right now just before the release of WL6 we have limited time for custom programming, so please check out the QuickRef on SetGlobal, GetGlobal etc.
Size:
Color:
What do you think that I should save to Global memory? I dont get the idea behind it, the concept.
Size:
Color:
For instance, the bar which triggered the signal. If the one retrieved from global memory is equal to the current bar, there's a trading signal fired by one of the other stocks, so you unconditionally buy/short the current symbol (even if a e.g. CrossOver buy signal isn't triggered).
Note that Wealth-Lab loops by symbols in alphabetical order, so if your trading signal comes from "MSFT", you obviously won't buy "AAPL" because it has already been processed. I leave coding a workaround for this puzzle up to you.
Size:
Color: