NexusFi: Find Your Edge


Home Menu

 





Solution to Equities PreMarket PostMarket Session issue (simple Noob Version)


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,675 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Solution to Equities PreMarket PostMarket Session issue (simple Noob Version)

  #1 (permalink)
 IFeelLikeNeo   is a Vendor
 
Posts: 26 since Nov 2019
Thanks Given: 8
Thanks Received: 38

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 stuff on here 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 session times to reflect market hours.

Thought I'd share in the hope this helps someone else with this challenge.

Thanks again for all your amazing work, I've already founds some great help here.

IFLN

Follow me on Twitter Started this thread Reply With Quote
Thanked by:




Last Updated on April 30, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts