I have developed a strategy which I run across all Nasdaq 100 stocks. By doing so I have added them all into a MultiInstrumentStrategy. I apply a Trendscore indicator to them individually. Later within the strategy I add them all up to receive a TotalTrendScore (for all 100 Nasdaq stocks together). For this example lets call it "N100StocksTrendScore". Now my strategy can plot this score into the Output window.
I also have a very sophisticated trading strategy for individual instruments. Now I would like to add the general market trend ("N100StocksTrendScore") to this strategy. I cannot load all N100 stocks again into the same strategy (due to performance issues, IB data limitations, etc.). But instead I prefer to only call a new dataseries which contains only the value "N100StocksTrendScore".
So my question is: How can I save values from a strategy (in my example the N100StocksTrendScore) into a global variable or globally accessible dataseries?
So that I can run the strategy on an instrument and only add:
Add("N100StocksTrendScore", PeriodType.Daily, 1);
Is this possible somehow? I would like to run the MultiInstrumentStrategy to update the N100StocksTrendScore value after US market close (using Yahoo), then I would like to save the value N100StocksTrendScore for usage later, disconnect and would then connect to InteractiveBrokers to trade lets say the ES 03-10 in realtime with my trading strategy (which would include the value N100StocksTrendScore) as an input parameter.
Any help, any suggestions, any templates?
Best regards
wtmnn


Comment