Questions tagged [ohlc]

84 questions
1
vote
1 answer

OHLC candles every X amount of ticks

I'm trying to create OHLC bars in postgresql starting from tick data. I want to create bars every 1000 ticks or every 500 ticks. Or every X amount of ticks. The database I'm saving has the bid/ask and a timestamp. I know that I could do a groupby…
1
vote
1 answer

select max and min values every x amount of rows-postgresql

I'm trying to create OHLC bars in postgresql starting from tick data. I want to create bars every 1000 ticks or every 500 ticks. Or every X amount of ticks. The database I'm saving has the bid/ask and a timestamp. I know that I could do a groupby…
1
vote
5 answers

How to split an array of object with 5 properties to a 2 dimensional array

The below is my data that I get from an API and I want to group it as time in one index and the other values in another index. Is that possible to split this? I want the array to be in the format as the values in a second array format Api data 0:…
Janani
  • 41
  • 3
1
vote
1 answer

Unable to use resample.ohlc() method - DataError: No numeric types to aggregate

I am receiving stock ticks second-wise and I am storing them in a dataframe. I need to resample them to get the ohlc value for a minute. Here is my code: def on_ticks(ws, ticks): global time_second, df_cols, tick_cols, data_frame for…
KawaiKx
  • 9,558
  • 19
  • 72
  • 111
0
votes
0 answers

Mpf finance display ohlc on graph

On the graph window the y (the ordinate) are displayed but i would like the Open, High, Low and Close of the candle my cursor is on to be displayed enter image description here That is it Read documentation Searched on stack & internet
jkbfdgb
  • 17
  • 5
0
votes
1 answer

Pandas Resample OHLC data Skipping time

I have a time series OHLC 1 min date. date,open,high,low,close,volume 2023-04-20 09:15:00+05:30,262.0,267.85,262.0,262.5,7300 2023-04-20 09:16:00+05:30,262.5,264.3,261.8,262.6,6300 2023-04-20 09:17:00+05:30,262.6,266.95,262.0,265.75,3600 2023-04-20…
Mintoo
  • 5
  • 1
  • 1
0
votes
1 answer

python dataframe resample backward

I want to resample a pandas time series counting backwards. For example, let's set up a simple time series of 11 days: index = pd.date_range('01-01-2018 00:00:00', '01-11-2018 23:59:00', freq='1T') randint = np.random.randint(low=0, high=9,…
jad
  • 29
  • 3
0
votes
1 answer

Deedle Resample on Price column and return Time field along with that

Trying to use Deedle to parse csv file and produce Open High Low Close values based on lastPrice value Bellow is the sample from csv that contains tick data (each line a is a tick interval): "time", "lastPrice", "bidPrice", "askPrice", "volume"…
mike123
  • 1,549
  • 15
  • 23
0
votes
0 answers

How to change the range of values on the y axis in the python cufflinks library?

Code: import cufflinks as cf cf.set_config_file(offline=True) qf=cf.QuantFig(table,title='BNBBTC',legend='top',name='GS', color='green') qf.add_ema(periods=60, name='EMA', color='yellow') qf.add_volume(title='Volume',…
0
votes
0 answers

type instance error when building trend_identifier using ohlc data

I am attempting to build a function that can identify whether or not the trend of the morning session of a NYSE ticker is 'bullish' or 'bearish', based on the current high/low of day, and which one was made most recently. an exmaple of two rows of…
Nick Bohl
  • 105
  • 3
  • 13
0
votes
0 answers

Stumped. How do I convert my datetime format to an acceptable format for pandas and mplfinance?

I am trying to use various charting packages for ohlc bar charting. Some success but I keep getting stuck on "TypeError: Expect data.index as DatetimeIndex". The samples that I copy work perfectly fine, like this below: import yfinance as…
Jimbo
  • 3
  • 3
0
votes
1 answer

Python OHLC convert weekly to biweekly

I have weekly data from Yahoo Finance Open High Low Close Adj Close Volume Date 1999-12-27 0.901228 0.918527 …
Ashish
  • 479
  • 3
  • 7
  • 18
0
votes
0 answers

Not converting Tick to Ohlc 1hr data convert problem

Tick to Ohlc 1hr data always start from 00:00:00 like 9:00:00 to 10:00:00. Even my data start from 9:15 it's not convert from 9:15 to 10:15....it just convert from 9:00:00 to 10:000 Solve this 1hr convert
0
votes
0 answers

How to filter minute OHLC data with daily?

Assuming I have days and symbols I would like to trade (inside of a DF): level_0 index date symbol ... change_1_day change_10_day volume_10_day volume_1_day 0 22177 22177 2022-12-20 ICCM ... 177.599829 None …
a7dc
  • 3,323
  • 7
  • 32
  • 50
0
votes
1 answer

Getting NaN when using pandas groupby

I have a dataframe like so: index date symbol stock_id open high low close volume vwap 0 0 2021-10-11 BVN 13 7.69 7.98 7.5600 7.61 879710 7.782174 1 1 2021-10-12 BVN …
a7dc
  • 3,323
  • 7
  • 32
  • 50