- ago
Is there any easy way to return after hours and premarket volume only?
0
633
Solved
9 Replies

Reply

Bookmark

Sort
- ago
#1
What do you mean by "return"? In a chart, in strategy code..?
0
- ago
#2
strategy code
0
- ago
#3
Okay, what about the bar scale?
0
- ago
#4
Ideally daily bars, but I realize that may not be possible.
0
- ago
#5
Why not Daily? Provided there is intraday data containing after hours data for the symbol, calling GetHistoryUnsynched with desired intraday scale as parameter should get you the raw data. Then you can set up a TimeSeries and filter out the primary session's bars based on the MarketDetails.
0
- ago
#6
Thanks Eugene. Can you provide some sample code for me to work with?

Ideally I’d like to incorporate after/pre market volume as a filter for a purchase decision. For example, if after/pre market volume is greater than 100k, purchase X symbol.
0
- ago
#7
Please find example code in the QuickRef. Though you'd have to change HistoryScale.Daily to a Minute... of your choice and optionally specify the source DataSet. Let me know if something isn't clear.
0
- ago
#8
Thanks Eugene. I think I have everything correct I just can’t get the “IsPostMarket” to filter volume properly from market details. Is there any sample code for that? Thanks again.
0
- ago
#9
Like many other properties of MarketDetails, IsPostMarket applies to live trading (current day). What I rather had in my mind is loop by the BarHistory object returned by GetHistoryUnsynched, comparing the DateTimes[idx] with the OpenTime/CloseTime..

You might also need to uncheck Filter Pre/Post.
1
Best Answer

Reply

Bookmark

Sort