Hello everyone!
Just want to share a solution I just found to a problem. I'm new to this so of course, holler if I've made any mistakes.
I wanted to create a simple entry that says, "buy if today's open is more than 2% higher than y'day's close." for equities (stocks, shares whatever you call 'em where you are) on a chart at a time resolution of less than a day (in my case 1,2,3,5 minute etc charts)
I spotted that since I get intra-day data from IQFeed, that instead of CloseD(1) returning the closing price at 1600, it returns the closing price when my Multicharts is set to the session end, which is 1700... showing the post-market price moves. So not a fair representation of y'day's stock market close. (nor of AvgTrueRange as that also looks back through thing post and pre market trading, etc etc)
Also, OpenD(0) doesn't return the open at 0930, but the premarket open at 0400 when I start getting premarket data.
I found some useful-looking code online about grabbing the previous day's price at a particular time, but it all was a bit complicated for a simple mind like mine...
Then I spotted that 1day charts do show the market open and closes and don't include post and pre market. But frustratingly when I added a 1D chart as data2 and referenced that, I got an un-solvable (to me anyway!) "not enough series length" error.
So there I was... stuck.
UNTIL !!!!
I just realised, I don't need post and pre market pricing for my systems! So durrr... I just updated the session time.
Then just 'cos, I worked out you can add x2 of the same symbol to MC (just change the Name) so that you can still have the choice of post&pre market charts or market-hours charts. So in my QuoteManager I have NFLX P&P (for Netflix Pre&Post) and plain vanilla NFLX that has my own, 'normal', session times that reflect main exchange market hours.
Thought I'd share in the hope this helps someone else with this challenge.
Premarket Postmarket Equities Sessions and Open/Close Issues [SOLVED]
- EuroNoob
- Posts: 12
- Joined: Apr 26 2020
- Location: Geneva
- Has thanked: 4 times
- Been thanked: 3 times
- Contact:
Further to this post, a friend taught my a trick; leave the one ticker in Quote Manager and amend the session times on the chart;
Right click > Format Instruments > Settings > Sessions
Better than my earlier solution, this avoids multiple tickers in Quote Manager while allowing you varied session times on the same ticker.
Right click > Format Instruments > Settings > Sessions
Better than my earlier solution, this avoids multiple tickers in Quote Manager while allowing you varied session times on the same ticker.