Dear Senior MC users & support staff,
I understand there's probably no easy way to do this, but I'm wondering if somebody has found any workaround, or if there's an "official solution".
- I would like to trade an equities strategy that is relatively simple... let's say "if there is a <-x% change on a security, and the price of the security is y, then go long".
- I need this strategy executed on thousands of symbols at the same time, depending on what symbol matches the criteria on the specific bar.
What is the best way to code this in a way that it doesn't require a lot of manual work, adding thousands of individual symbols, opening charts etc? Maybe with ADE & arrays or something similar? Any ideas anybody?
Thank you,
-Ben
Equities universe
- rrams
- Posts: 129
- Joined: 10 Feb 2011
- Location: USA
- Has thanked: 7 times
- Been thanked: 70 times
- Contact:
Re: Equities universe
Oh gosh Ben, that is probably a difficult thing to do with any charting platform. It's not just the lack of a programmable symbol import or hotkey that is the issue.
MultiCharts is designed to work with streaming quote data. Instead; when you want to work with thousands of symbols, you normally request snap quotes. One last price quote at an interval the provider can handle.
Portfolio Trader is the only tool MultiCharts has to potentially trade thousands of symbols. (The scanner can only accept indicators and that many open charts would choke.)
So, were you planning to use ASCII Mapping as the data source? Who is your data provider? Is this a daily or intraday timeframe?
Creating a large list of symbols to trade is usually done with a screener like https://www.tradingview.com/screener/. Have you downloaded a CSV list of symbols? Did you try to import it?
I hope others can offer better help than me!
MultiCharts is designed to work with streaming quote data. Instead; when you want to work with thousands of symbols, you normally request snap quotes. One last price quote at an interval the provider can handle.
Portfolio Trader is the only tool MultiCharts has to potentially trade thousands of symbols. (The scanner can only accept indicators and that many open charts would choke.)
So, were you planning to use ASCII Mapping as the data source? Who is your data provider? Is this a daily or intraday timeframe?
Creating a large list of symbols to trade is usually done with a screener like https://www.tradingview.com/screener/. Have you downloaded a CSV list of symbols? Did you try to import it?
I hope others can offer better help than me!
Re: Equities universe
Hey Russ, how are you? Are you reading private messages on this board at all?
For data source I was thinking IB... and for this purpose 1h, 4h or even EOD data might be just something to test with and the data issues could be solved later.
PT is unstable and doesn't allow any granular control over charts, etc., so that's not a solution to this specific problem for sure.
So yeah - looks like there's no easy solution to a pretty common problem, doesn't it?
For data source I was thinking IB... and for this purpose 1h, 4h or even EOD data might be just something to test with and the data issues could be solved later.
PT is unstable and doesn't allow any granular control over charts, etc., so that's not a solution to this specific problem for sure.
So yeah - looks like there's no easy solution to a pretty common problem, doesn't it?
Re: Equities universe
Hi c0ntango,
I am trading large portfolios of equities, i would say biggest problem you are facing is mapping and adjusting your portfolio in an easy way.
Would say that MC and portfoliotrader is not he right tool for the job.
I am using Multicharts for my futures trading, but for trading thousands of equities, i had to opt for another platform, its was just just not doable with MC.. i tried to make it work, and tried to solve the mapping issues combined with better handling of trading universe/watchlists etc... but no
Good luck though, and let us know if you make it work for you
I am trading large portfolios of equities, i would say biggest problem you are facing is mapping and adjusting your portfolio in an easy way.
Would say that MC and portfoliotrader is not he right tool for the job.
I am using Multicharts for my futures trading, but for trading thousands of equities, i had to opt for another platform, its was just just not doable with MC.. i tried to make it work, and tried to solve the mapping issues combined with better handling of trading universe/watchlists etc... but no
Good luck though, and let us know if you make it work for you
Re: Equities universe
IB may not be the right choice here, both from a data and symbol mapping standpoint.
Couple of thoughts, assuming you want to stick with MC for this strategy.
If you are running hundreds or thousands of symbols, you may want to get creative with the MC Scanner. With MC.NET you can fire orders from an indicator, thus opening up the possibility of using the scanner for the strategy.
You can also use the scanner in either version of MC to fire signals to an external interface. In this case all decision making will be within MC while order execution would be outside of MC.
Couple of thoughts, assuming you want to stick with MC for this strategy.
If you are running hundreds or thousands of symbols, you may want to get creative with the MC Scanner. With MC.NET you can fire orders from an indicator, thus opening up the possibility of using the scanner for the strategy.
You can also use the scanner in either version of MC to fire signals to an external interface. In this case all decision making will be within MC while order execution would be outside of MC.
Re: Equities universe
Thanks TraderGuy, very smart. Yes, I wouldn't use MC for direct execution anyway - that part is already separated. What do you suggest for data? IQFeed or similar?
Re: Equities universe
I use TS Data. I imagine that IQ Feed would work well. The MC Scanner "batches" it's symbol requests, so updating a large amount of symbols only requires a small amount of concurrent requests.Thanks TraderGuy, very smart. Yes, I wouldn't use MC for direct execution anyway - that part is already separated. What do you suggest for data? IQFeed or similar?
Re: Equities universe
I see a few options in MC, but at this point it's easier to do it in a platform built for this.
1. Create an MC strategy to read in an array of symbols from CSV, or Sharedvar.
(Logic equivalent to if getsymbolname in symbol_arr: then switch this strategy/symbol instance on, else flatten and halt symbol / strategy)
** On top of this, it would have to actually have the strategy logic you want it to execute ON the universe in the strategy.
2. Create a base universe in MC (say SP500), add symbols manually + add to PortfolioTrader instance. Add in custom 'universe' version of strategy.
3. Build universe screen in Python / Pandas -- read in something like Quandl, IQFeed, etc live, find your top x symbols, write symbols to CSV or sharedvar.
It's also pretty fragile... depending on dumb things like symbol names matching / symbol mapping in MC, reading in a big CSV, etc.
I also have tried doing similar things, and I wasn't able to get PFT instances to communicate as well as I hoped. (I tried running a MR strategy where 2 instances communicated with globals, but there were often delays in the global signals between them).
It also didn't work in backtest -- this certainly wouldn't, as you can't really read in historical screens without a ton of work to make the above process in python iterative/event driven through the universe, and then writing/reading a more complex CSV of Date : Symbols, matching dates, etc.
In short, after completing 3 alone you might as well simply execute these in Python, or python frameworks built for this (QT, QC, Blueshift, QuantRocket (?) etc).
Other approaches:
A 'hack' approach, is to simply screen on your own with something like Tradingview / Scanner, and then add in the top symbols manually in MC. Sort of dynamic fixed universe.
Using MC.Net, simply add as many data streams as it will allow, sort them inside each strategy, compare your current stream to see if your data's value is within the top x, if so switch it on. Would require knowing the base universe in advance, and I'm not sure how many alt price arrays NT8 / MC.Net allow.
This quickly get's tedious, and is deceptively difficult to track all of those Bar closes / ensure you're not running before they have all closed.
1. Create an MC strategy to read in an array of symbols from CSV, or Sharedvar.
(Logic equivalent to if getsymbolname in symbol_arr: then switch this strategy/symbol instance on, else flatten and halt symbol / strategy)
** On top of this, it would have to actually have the strategy logic you want it to execute ON the universe in the strategy.
2. Create a base universe in MC (say SP500), add symbols manually + add to PortfolioTrader instance. Add in custom 'universe' version of strategy.
3. Build universe screen in Python / Pandas -- read in something like Quandl, IQFeed, etc live, find your top x symbols, write symbols to CSV or sharedvar.
It's also pretty fragile... depending on dumb things like symbol names matching / symbol mapping in MC, reading in a big CSV, etc.
I also have tried doing similar things, and I wasn't able to get PFT instances to communicate as well as I hoped. (I tried running a MR strategy where 2 instances communicated with globals, but there were often delays in the global signals between them).
It also didn't work in backtest -- this certainly wouldn't, as you can't really read in historical screens without a ton of work to make the above process in python iterative/event driven through the universe, and then writing/reading a more complex CSV of Date : Symbols, matching dates, etc.
In short, after completing 3 alone you might as well simply execute these in Python, or python frameworks built for this (QT, QC, Blueshift, QuantRocket (?) etc).
Other approaches:
A 'hack' approach, is to simply screen on your own with something like Tradingview / Scanner, and then add in the top symbols manually in MC. Sort of dynamic fixed universe.
Using MC.Net, simply add as many data streams as it will allow, sort them inside each strategy, compare your current stream to see if your data's value is within the top x, if so switch it on. Would require knowing the base universe in advance, and I'm not sure how many alt price arrays NT8 / MC.Net allow.
This quickly get's tedious, and is deceptively difficult to track all of those Bar closes / ensure you're not running before they have all closed.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Equities universe
You could try to do the following action:
1) You add all symbol that you want in the scanner,
2) Second built your strategy,
3) Third attach yor strategy to the scanner.
1) You add all symbol that you want in the scanner,
2) Second built your strategy,
3) Third attach yor strategy to the scanner.
Re: Equities universe
Cant trade any symbol, only D1 from a strategy — so if you could attach scanner to strategy, would still need an instance for every single symbol in the universe, and they would all need to communicate with same scanner... which I don’t see how you could do anyway.
Re: Equities universe
Yes, you need a row for each symbol in the scanner.
Build a trading indicator, track your position count, PnL, bars in trade, and whatever else you need via a shared resource. This all can be done. SMOP. I run portfolios in a similar scanner scanner today, and execute on TS from an MC Strategy. What the OP wants can be done. Creativity and programming are required.
Build a trading indicator, track your position count, PnL, bars in trade, and whatever else you need via a shared resource. This all can be done. SMOP. I run portfolios in a similar scanner scanner today, and execute on TS from an MC Strategy. What the OP wants can be done. Creativity and programming are required.
Re: Equities universe
scanner rows / indicators can communicate basic values with a strategy, but they can’t share their sorted position based on the scanner query, which is all that matters for universe.
Shared resource ... Sharedvar? Globals?
I think of like 500 symbols for universe.
Ex: they can share that AAPL has an RSI, they can’t share that their RSI is within the top X RSI’s out of 500 symbols in the scanner.
So... could post 500 RSI values in sharedvar, but scanner row can’t reference itself, or it’s position in the sorted scanner in the respective indicators source code (as far as I know).
posting a position count, PNL, bar count etc has no relevance — basic GV’s.
you might as well post those scanned values to SV from the strategies in the 500 or so charts you would also need to run like this.
So you end up with 500 RSI’s, 500 charts, and a scanner adding no value.
The point is to avoid adding 500 charts calculating 500 RSI’s and then sorting them, and have the scanner determine maybe the 5 / 500 charts / symbols you should be trading — and trade them.
If viable, would appreciate a concrete implementation. I don’t think it is, beyond the chart per symbol method (tiresome and ridiculous), or external libraries like Python handling universe to then read in MC.
Shared resource ... Sharedvar? Globals?
I think of like 500 symbols for universe.
Ex: they can share that AAPL has an RSI, they can’t share that their RSI is within the top X RSI’s out of 500 symbols in the scanner.
So... could post 500 RSI values in sharedvar, but scanner row can’t reference itself, or it’s position in the sorted scanner in the respective indicators source code (as far as I know).
posting a position count, PNL, bar count etc has no relevance — basic GV’s.
you might as well post those scanned values to SV from the strategies in the 500 or so charts you would also need to run like this.
So you end up with 500 RSI’s, 500 charts, and a scanner adding no value.
The point is to avoid adding 500 charts calculating 500 RSI’s and then sorting them, and have the scanner determine maybe the 5 / 500 charts / symbols you should be trading — and trade them.
If viable, would appreciate a concrete implementation. I don’t think it is, beyond the chart per symbol method (tiresome and ridiculous), or external libraries like Python handling universe to then read in MC.
Re: Equities universe
One possible way would be to use a PFT global MM type algo to aggregate all the values needed for universe, but it’s really just an abstracted version of the 500 charts, symbols, strategies method.
That’s not universe selection, it’s trading the entire universe while ‘sleeping’ 95% of them.
That’s not universe selection, it’s trading the entire universe while ‘sleeping’ 95% of them.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Equities universe
I see that many traders in TS have 3 tools, the RadarSccreen and HotList to scan thousand of stocks and TRADE all them directly from Radarscreen by trading system but no 1 charts is open.
This is very usefull because you avoid to open hundred of charts.
Is it possible to do the same in MC?
https://www.TS.com/learn/usin ... hot-lists/
MC should seee how the Hotlist is done in TS.
Hotlist ALL USA STOCKS are included and thna when first filkter criter is done you apply the ts in RadarScreen
This is very usefull because you avoid to open hundred of charts.
Is it possible to do the same in MC?
https://www.TS.com/learn/usin ... hot-lists/
MC should seee how the Hotlist is done in TS.
Hotlist ALL USA STOCKS are included and thna when first filkter criter is done you apply the ts in RadarScreen
Re: Equities universe
I’ve used radarscreen with hotlists, but you cannot trade them from the radarscreen, from my understanding. That’s the issue... still need the charts for each symbol in hotlist.
It kinda reads like it’s possible, but it’s not. Can’t apply strategies to radarscreen, solely indicators. Can’t enter from indicators.
Also can’t reference position in radar in indicators, even if you could.
It kinda reads like it’s possible, but it’s not. Can’t apply strategies to radarscreen, solely indicators. Can’t enter from indicators.
Also can’t reference position in radar in indicators, even if you could.
Re: Equities universe
While you cannot execute a "Strategy" in Radar, you can trade from an indicator using Order Objects. So trading 500+ Symbols without charts is certainly possible. Looks like this may be a possibility in the MC.NET scanner by accessing Trade Manager. For MC, I wrote sender/subscriber model where trades are initiated on MC and executed on TS - this can run in a Strategy or an Indicator.
Re: Equities universe
Yeah, in TS I reviewed it and you can do it using OOEL ... but OOEL isn’t supported in MC — it’s also pretty heavy and not sure it’s worth the effort at this point, as radarscreen also limits the amount of symbols you can use.
It would at least ‘allow’ it in TS though via OOEL.
Do you have a sample of the OOEL needed to send / receive, or the indicator based order management ?
I did find this (for TS), http://help.TS.com/10_00/eng/ ... _class.htm#
My concern is I’m also not seeing any way to reference a radarscreens current row/position in the sorted scan... so it would need to be an exhaustive calc + sort, similar to writing this in a strategy. Just changes from adding 1k charts to adding 1k symbols + indicators to radar.
Is it possible to reference a sorted position of a radarscreen row ?
It would at least ‘allow’ it in TS though via OOEL.
Do you have a sample of the OOEL needed to send / receive, or the indicator based order management ?
I did find this (for TS), http://help.TS.com/10_00/eng/ ... _class.htm#
My concern is I’m also not seeing any way to reference a radarscreens current row/position in the sorted scan... so it would need to be an exhaustive calc + sort, similar to writing this in a strategy. Just changes from adding 1k charts to adding 1k symbols + indicators to radar.
Is it possible to reference a sorted position of a radarscreen row ?
Re: Equities universe
RS has a 2000 symbol limit. As far as I know, you can not access row number. However, in MC or TS you can create a list and sort that if you utilize ELC. You can then get the key/value via an index or key search and only trade the top NN values, or whatever it is you are looking to rank by.Yeah, in TS I reviewed it and you can do it using OOEL ... but OOEL isn’t supported in MC — it’s also pretty heavy and not sure it’s worth the effort at this point, as radarscreen also limits the amount of symbols you can use.
It would at least ‘allow’ it in TS though via OOEL.
Do you have a sample of the OOEL needed to send / receive, or the indicator based order management ?
I did find this (for TS), http://help.TS.com/10_00/eng/tsdevhelp/ ... _class.htm#
My concern is I’m also not seeing any way to reference a radarscreens current row/position in the sorted scan... so it would need to be an exhaustive calc + sort, similar to writing this in a strategy. Just changes from adding 1k charts to adding 1k symbols + indicators to radar.
Is it possible to reference a sorted position of a radarscreen row ?
You can trade from an indicator in MC if you use an interface to a broker. One way to do this is to write out Order Interface Files and pick them up via a polling mechanism (by tick or timer) in a receiving application that submits the orders. You can use ELC for this as well. Another way would be to utilize a broker API and write a DLL that could be incorporated into your MC Indicators.
You can trade from the MC Scanner with MC .Net See link and example.
viewtopic.php?f=20&t=11028&p=56685&hili ... Net#p56685
If you want to trade from the MC scanner, pick an approach and do some prototyping. I have used some of the approaches above with success. Good luck with it.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Equities universe
In this situation, why not add all symbol in portfolio trader? Scanner does not enable for autotrading purpose, but portfolio trader yes.
You will add all stocks that you need in portfolio.
By default Autotrading is not supported in the Scanner window.
https://www.multicharts.com/trading-sof ... _Watchlist
You will add all stocks that you need in portfolio.
By default Autotrading is not supported in the Scanner window.
https://www.multicharts.com/trading-sof ... _Watchlist
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Equities universe
The Multicharts market scanner has two limits: 1) automatic trading from the market sanner is not possible 2) the maximum number of symbols is 5,000. In your opinion, if we insert the 5000 symbols in the Portfolio Trader, can we overcome both problems? Have any of you tried to trade with thousands of symbols on the Portfolio Trader?
Re: Equities universe
I have the same challenge. I like to scan, or even just browse, long watchlists like "S&P 500." For this, I use another platform, TC2000. MC.NET does everything else I need. If only it had better handling of watchlists, I could stop using TC2000.
- Attachments
-
- 2021-10-06_17-00-25.jpg
- (57.57 KiB) Not downloaded yet
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times
Re: Equities universe
Please, could you tell the platform that you find good?...i had to opt for another platform, its was just just not doable with MC..
Re: Equities universe
Tickblazer, this platforms solved the issue when needing to trade thousands of symbols, handle symbol lists dynamically while running, pausing and re starting portfolios while syncing up existing positions with ease, and no need to map each symbol individually etc... still running MC for my future trading though ...