Method to fetch the opening price of current day
Author: kelvinyip
Creation Date: 9/18/2019 1:34 PM
profile picture

kelvinyip

#1
Eugene

What is the fastest method to call for current intraday opening price for all my symbols in a loop ?
I want the opening price of today one minute after open for my strategy. partialValue method or something else ?
profile picture

Eugene

#2
1. GetSessionOpen: fetching next bar open price

2. and yes, .PartialValue for streaming data on the primary symbol (N/A to external symbols): Fidelity Partial Bars
profile picture

kelvinyip

#3
Partial value works if I have my time frame as daily and using a single symbol and got my streaming on. If I run it in portfolio mode, streaming will always be disabled and the partial value will be NaN.

Question: If I run this is strategy monitor, would steaming be disabled as well ? I need to do this for a 100 symbols.... in one loop. Is there like a different way to do this ?
profile picture

Eugene

#4
QUOTE:
If I run it in portfolio mode, streaming will always be disabled and the partial value will be NaN.

This is by design. For the method applicable to MSB mode and the SM, see #1 in my reply above.
profile picture

kelvinyip

#5
and I was the one who asked about #1 in the thread back in 2012... sorry I am losing it... session open works... seems to have cached the data as well.

thx
profile picture

Eugene

#6
Glad to have helped.

QUOTE:
and I was the one who asked about #1 in the thread back in 2012

Well, it's normal. It happens to me too when I stumble onto an old conversation and even a code solution.
profile picture

kelvinyip

#7
GetSessionOpen on works for daily bar ? If I want to use current 1 min Close and compare with GetSessionOpen, what can I do ?
For speed reason, I don't want to download /update all those 1 min quote for all my symbols in my dataset. I think if I were doing 1 symbol, I can use partialValue...
profile picture

Eugene

#8
Options like .PartialValue (for Fidelity data) or "Always return data with partial bar" (for Yahoo data) deliver the current Daily bar's Close (unfinished) - not for the current 1-min Close.

For simplicity's sake, just have the 1-minute data for all symbols in your DataSet up to date. Wealth-Lab will have to request it either way, even for Strategy Monitor updates. Your notion of getting the current Close on Minute scale without backfilling and updating the data doesn't make great sense to me.

On a related note, don't forget to see usage notes for GetSessionOpen in the QuickRef.
profile picture

kelvinyip

#9
ok read that. First mistake I made is using yahoo daily, not fidelity daily... and I guess I have to make sure 1 min is up to date as you said...
profile picture

Eugene

#10
Your understanding is correct.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).