I hope you're keeping well.
I suppose this will be the first time posting on a topic properly. I've tried to search the discussion board and can't find anything related to this topic. I could be totally wrong. Please send me to a resource if need be.
I will try to be clear on what I am attempting to do with Multicharts (PowerLanguage version only).
I have 5 different workspaces containing 20 Stock Ticker chart windows each. Total of 100 tickers.
I will try to give a basic example here. Let's suppose I had the following code for argument's sake, and it was an indicator applied to each ticker:
Code: Select all
vars:
openP(0),
upperPivot(0),
pricetradingabove(0);
openP = OpenS(0);
upperPivot = OpenP + (HighS(1) + LowS(1));
if close crosses above upperPivot then pricetradingabove = 1 else pricetradingabove = 0;
plot1(pricetradingabove,"PAbove");
So each chart window will have the indicator applied and will output either a 1 or a 0. I want to create an indicator that can access the values of each ticker across each of the 5 workspaces and tally the number of tickers that had an output = 1 and get a ratio.
I appreciate this may not be the most elegant way of coding such a solution either. If you think there is a mor efficient way in accessing the data i'm all open ears.
Is this even possible to do in Multicharts PowerLanguage version? The example above is simple but the same concept can be applied to a variety of ideas which is why I ask.
Please excuse my ignorance. I have read about Global Variables and the like but unsure if that is what is required here. It's all confusing in honesty.
I would appreciate if anyone can help and guide me to relevant resources.
Much appreciated.
Kind regards,
svfutures