Candle Stick Chart - Removing Time & Date breaks candle chart

I’m trying to plot a candle stick chart by removing non business hours and holiday. Below is my code

fig = go.Figure(data=[go.Candlestick(
        x=dataFrame.index,
        open=dataFrame['open'],
        high=dataFrame['high'],
        low=dataFrame['low'],
        close=dataFrame['close']
    )])
fig.update_xaxes(
    rangebreaks=[
        dict(values=dt_breaks),
        dict(bounds=[15.5, 9.25], pattern="hour"),
    ]
)
fig.show()

It breaks the candle stick chart

Could someone please help on this

Hey @velkumar10 welcome to the community.

I think it’ll be pretty difficult to help you with that without your (or equivalent) data.

Hi @AIMPED

Below is my sample data

timestamp	ticker	open	close	low	high	volume	openinterest	tdate	ttime	vwap	rsi	sma_volume	sma_openinterest
01-08-2024 10:55	NIFTY01AUG2424950CE.NFO	90.05	89.15	83.55	92.55	1955600	18978100	01-08-2024	10:54:59	72.8594296	52.16486611	6727160	46271487.5
01-08-2024 11:00	NIFTY01AUG2424950CE.NFO	88.7	87	86.35	91.2	1152750	19437575	01-08-2024	10:59:59	72.23020424	50.51241725	6281106.25	45762208.75
01-08-2024 11:05	NIFTY01AUG2424950CE.NFO	87	82.35	78.3	88.45	2668425	19867875	01-08-2024	11:04:59	71.68987326	47.04160414	5704336.25	44755426.25
01-08-2024 11:10	NIFTY01AUG2424950CE.NFO	82.35	87.95	82.35	90.7	1839900	19952525	01-08-2024	11:09:59	72.59072165	51.3748542	5427020	43605627.5
01-08-2024 11:15	NIFTY01AUG2424950CE.NFO	87.5	53.55	52.45	99.6	4778500	34538450	01-08-2024	11:14:59	72.50547143	33.33226518	5332506.25	43024147.5
01-08-2024 11:20	NIFTY01AUG2424950CE.NFO	94.75	91.6	89.5	95	1761725	19246050	01-08-2024	11:19:59	73.64255029	52.99593504	5051941.25	41530612.5
01-08-2024 11:25	NIFTY01AUG2424950CE.NFO	91.4	88.3	87.35	92.9	1160000	19470425	01-08-2024	11:24:59	75.53414029	51.5751342	4765580	39919382.5
01-08-2024 11:30	NIFTY01AUG2424950CE.NFO	88.4	90.2	87.7	92.6	1146975	19703200	01-08-2024	11:29:59	78.34870098	52.3669486	4354670	38191420
01-08-2024 11:35	NIFTY01AUG2424950CE.NFO	89.8	86.5	81.6	92.2	1815775	19830475	01-08-2024	11:34:59	81.00954515	50.63073944	3986208.75	36336246.25
01-08-2024 11:40	NIFTY01AUG2424950CE.NFO	87	85.85	82.35	87.15	1352825	20236500	01-08-2024	11:39:59	85.0747023	50.31513743	3478976.25	34276531.25
01-08-2024 11:45	NIFTY01AUG2424950CE.NFO	85.4	70.9	65	85.45	4717850	20675450	01-08-2024	11:44:59	83.62078121	43.58565612	3314715	32038170
01-08-2024 11:50	NIFTY01AUG2424950CE.NFO	71	61.9	61.15	75.25	3418700	22139725	01-08-2024	11:49:59	81.28830026	40.107902	3160728.75	29720428.75
01-08-2024 11:55	NIFTY01AUG2424950CE.NFO	62.7	66.2	62.7	69.05	3962950	23941525	01-08-2024	11:54:59	78.78748721	42.46980345	2979612.5	27377005
01-08-2024 12:00	NIFTY01AUG2424950CE.NFO	66.3	68.15	62.7	71.05	3237100	24684250	01-08-2024	11:59:59	77.35124486	43.55686519	2777343.75	24961177.5
01-08-2024 12:05	NIFTY01AUG2424950CE.NFO	67.75	65.1	64.2	69.6	2052550	24420775	01-08-2024	12:04:59	76.04430412	42.21330352	2471766.25	22470917.5
01-08-2024 12:10	NIFTY01AUG2424950CE.NFO	65.05	64.05	61.6	67.35	1995550	24495025	01-08-2024	12:09:59	74.76089347	41.73600944	2261801.25	21145702.5
01-08-2024 12:15	NIFTY01AUG2424950CE.NFO	63.9	61.65	55.3	105.75	3971275	24604100	01-08-2024	12:14:59	74.32037793	40.60586967	2394951.25	21501235
01-08-2024 12:20	NIFTY01AUG2424950CE.NFO	61.75	61.85	58.4	108.45	2897975	25680450	01-08-2024	12:19:59	73.87893376	40.74985362	2444687.5	21899062.5
01-08-2024 12:25	NIFTY01AUG2424950CE.NFO	61.85	96.65	55.15	100.6	4099600	25304550	01-08-2024	12:24:59	74.30134965	59.25752886	2600632.5	22273498.75
01-08-2024 12:30	NIFTY01AUG2424900CE.NFO	96.65	91.75	85.2	101.95	3119650	21649700	01-08-2024	12:29:59	76.4087107	56.5776871	2655283.75	22442836.25
01-08-2024 12:35	NIFTY01AUG2424900CE.NFO	91.6	90.25	87.7	92.95	2140350	22221975	01-08-2024	12:34:59	76.46239724	55.74656734	2664521.25	22605030
01-08-2024 12:40	NIFTY01AUG2424900CE.NFO	90.3	84.4	81	92.65	3049425	23252350	01-08-2024	12:39:59	76.78795674	52.50701474	2759355	22795768.75
01-08-2024 12:45	NIFTY01AUG2424900CE.NFO	83.95	86	83.65	89.8	2481100	24500950	01-08-2024	12:44:59	76.98451795	53.30624968	2749988.75	23027422.5
01-08-2024 12:50	NIFTY01AUG2424900CE.NFO	86.25	95.8	83.2	102.65	3405650	24325950	01-08-2024	12:49:59	77.85133842	57.97154553	2828276.25	23246093.75
01-08-2024 12:55	NIFTY01AUG2424900CE.NFO	95.6	95.45	93.2	97.85	1772350	22959725	01-08-2024	12:54:59	78.31441974	57.74962562	2677968.75	22667157.5
01-08-2024 13:00	NIFTY01AUG2424900CE.NFO	95.9	93	91.1	100.25	1821575	23103450	01-08-2024	12:59:59	79.49750323	56.12983867	2680961.25	22860027.5
01-08-2024 13:05	NIFTY01AUG2424900CE.NFO	93.65	54.45	54	102.55	2654300	26109450	01-08-2024	13:04:59	80.00094635	38.04684433	2755676.25	23191978.75
01-08-2024 13:10	NIFTY01AUG2424950CE.NFO	54.4	59.3	54.35	63.05	6940400	38275425	01-08-2024	13:09:59	78.00926802	40.63796348	3045347.5	24120590
01-08-2024 13:15	NIFTY01AUG2424950CE.NFO	59.2	61.45	58.45	65.8	5065975	37733800	01-08-2024	13:14:59	77.0203397	41.80002247	3207857.5	25015756.25
01-08-2024 13:20	NIFTY01AUG2424950CE.NFO	61.2	59.65	57.75	64.4	3859450	37150100	01-08-2024	13:19:59	76.18077071	41.0750587	3333188.75	25861436.25
01-08-2024 13:25	NIFTY01AUG2424950CE.NFO	59.4	98.5	53.8	104.1	3856675	28681575	01-08-2024	13:24:59	77.34345702	58.00458665	3290130	26261742.5
01-08-2024 13:30	NIFTY01AUG2424900CE.NFO	99.05	94.85	93.6	103.3	1796525	22444950	01-08-2024	13:29:59	78.32615261	56.36607325	3209021.25	26277003.75
01-08-2024 13:35	NIFTY01AUG2424900CE.NFO	95.7	93.25	89.5	96.75	2032600	22536325	01-08-2024	13:34:59	79.07943873	55.62431205	3112503.75	26206743.75
01-08-2024 13:40	NIFTY01AUG2424900CE.NFO	93.5	92	89.2	99.55	1883800	22758725	01-08-2024	13:39:59	79.22336889	55.01519091	3044838.75	26110467.5
01-08-2024 13:45	NIFTY01AUG2424900CE.NFO	92.15	90.05	87.8	94	1567725	22816450	01-08-2024	13:44:59	78.65910301	54.02135705	3020597.5	26030251.25
01-08-2024 13:50	NIFTY01AUG2424900CE.NFO	89.6	94.75	89	95.1	1516900	23379350	01-08-2024	13:49:59	78.58502058	56.0807264	2996665	25974467.5
01-08-2024 13:55	NIFTY01AUG2424900CE.NFO	94.9	97.8	92.55	100.35	1992900	23052675	01-08-2024	13:54:59	78.90948361	57.41373905	2897746.25	25896896.25
01-08-2024 14:00	NIFTY01AUG2424900CE.NFO	98.3	99.15	92.05	103.55	1977750	23285100	01-08-2024	13:59:59	79.37120918	58.02107508	2851735	25777128.75
01-08-2024 14:05	NIFTY01AUG2424900CE.NFO	99.65	103.65	95	105.55	2321425	23471700	01-08-2024	14:04:59	79.41297623	60.06550022	2762826.25	25685486.25
01-08-2024 14:10	NIFTY01AUG2424900CE.NFO	104	103.15	51.9	107.15	4208875	29903925	01-08-2024	14:09:59	79.5303306	59.71749667	2817287.5	26098197.5
01-08-2024 14:15	NIFTY01AUG2424900CE.NFO	102.9	97.6	96.4	103.95	1404125	22964875	01-08-2024	14:14:59	79.53028419	55.84950474	2780476.25	26135342.5
01-08-2024 14:20	NIFTY01AUG2424900CE.NFO	96	94	87.75	97.9	3067475	22981225	01-08-2024	14:19:59	81.05684509	53.4319347	2781378.75	26121786.25
01-08-2024 14:25	NIFTY01AUG2424900CE.NFO	93.1	93.6	90.35	96.5	1747050	23196025	01-08-2024	14:24:59	85.63884249	53.15660116	2744676.25	26056540
01-08-2024 14:30	NIFTY01AUG2424900CE.NFO	92.85	90	83.2	93.9	3169850	24137000	01-08-2024	14:29:59	89.2379953	50.62802301	2732886.25	26047092.5
01-08-2024 14:35	NIFTY01AUG2424900CE.NFO	89.15	82.15	75.45	91.3	4398175	24774100	01-08-2024	14:34:59	91.48326753	45.54089595	2864177.5	26137811.25
01-08-2024 14:40	NIFTY01AUG2424900CE.NFO	82.25	81	78.05	85.9	2655675	25451025	01-08-2024	14:39:59	91.40185121	44.83023009	2905882.5	26255190
01-08-2024 14:45	NIFTY01AUG2424900CE.NFO	81.25	109.9	49.2	110.3	8778475	29591525	01-08-2024	14:44:59	90.82679161	61.2116057	3212091.25	26429293.75
01-08-2024 14:50	NIFTY01AUG2424950CE.NFO	59.4	57.2	51.85	108	10313850	37674975	01-08-2024	14:49:59	86.99723519	38.66554121	3380763.75	26399271.25
01-08-2024 14:55	NIFTY01AUG2424950CE.NFO	56.9	98.65	48.75	103	6625100	32300225	01-08-2024	14:54:59	86.35507829	53.25068788	3458720	26127592.5
01-08-2024 15:00	NIFTY01AUG2424900CE.NFO	97.9	93.1	86.95	100.25	2949350	23073550	01-08-2024	14:59:59	86.60356428	51.48529017	3413215	25423765
01-08-2024 15:05	NIFTY01AUG2424900CE.NFO	92.75	88.5	86	101.85	4106375	22372300	01-08-2024	15:04:59	86.82145997	50.00555127	3425700	25108301.25
01-08-2024 15:10	NIFTY01AUG2424900CE.NFO	88.8	56.6	50.75	104	9907000	26799150	01-08-2024	15:09:59	84.12626414	41.16888316	3831223.75	25326011.25
01-08-2024 15:15	NIFTY01AUG2424950CE.NFO	55.75	59.85	54.1	62.5	16165550	36810850	01-08-2024	15:14:59	78.78422556	42.28784424	4537871.25	26039737.5
01-08-2024 15:20	NIFTY01AUG2424950CE.NFO	60.2	61.55	57.5	64.6	8838600	32808750	01-08-2024	15:19:59	76.43213166	42.89962679	4885611.25	26542238.75
01-08-2024 15:25	NIFTY01AUG2424950CE.NFO	61.7	60.45	59.6	63.9	5080525	28286225	01-08-2024	15:24:59	75.05380211	42.58505811	5061251.25	26815727.5
01-08-2024 15:30	NIFTY01AUG2424950CE.NFO	60.6	60.8	59.65	60.95	2926225	23072200	01-08-2024	15:29:59	74.20784214	42.72895688	5131717.5	26800370
02-08-2024 09:20	NIFTY08AUG2424700CE.NFO	181	196.7	175	239.4	1106650	1576325	02-08-2024	09:19:59	75.16531523	72.03585348	5087405	25726552.5
02-08-2024 09:25	NIFTY08AUG2424750CE.NFO	194.95	192.4	180.95	199.8	463825	2476725	02-08-2024	09:24:59	75.41390259	70.80130072	5011708.75	24686133.75
02-08-2024 09:30	NIFTY08AUG2424750CE.NFO	194.05	165.05	164.7	203.75	1103750	7253225	02-08-2024	09:29:59	76.23191488	63.36305351	4950825	23875210
02-08-2024 09:35	NIFTY08AUG2424750CE.NFO	192.55	185.9	180.15	194.45	356925	3270450	02-08-2024	09:34:59	76.35302635	66.27210878	4758227.5	22543536.25
02-08-2024 09:40	NIFTY08AUG2424750CE.NFO	185.3	174.85	172.8	185.6	285075	3589350	02-08-2024	09:39:59	76.54084072	63.39897505	4702275	21574760
02-08-2024 09:45	NIFTY08AUG2424750CE.NFO	175	185	167.75	198.8	594850	4428675	02-08-2024	09:44:59	75.79868263	64.90409112	4578643.75	20647132.5
02-08-2024 09:50	NIFTY08AUG2424700CE.NFO	184.75	203.5	177.9	212.4	669175	3020400	02-08-2024	09:49:59	77.71598592	67.52535937	4524750	19638351.25
02-08-2024 09:55	NIFTY08AUG2424650CE.NFO	204.9	182	178.6	210.8	705375	6595175	02-08-2024	09:54:59	78.46577309	61.75286521	4401526.25	18761260
02-08-2024 10:00	NIFTY08AUG2424700CE.NFO	182.1	196.25	175.75	206.45	243300	3077725	02-08-2024	09:59:59	78.15517352	63.9524153	4193782.5	17676441.25
02-08-2024 10:05	NIFTY08AUG2424650CE.NFO	197.1	197.45	191.85	199.65	99175	2020700	02-08-2024	10:04:59	77.21560156	64.13944177	4065957.5	16504925
02-08-2024 10:10	NIFTY08AUG2424650CE.NFO	197.55	177.85	174.15	207.05	262775	3452300	02-08-2024	10:09:59	79.67576196	58.77551498	3640172.5	15197963.75
02-08-2024 10:15	NIFTY08AUG2424700CE.NFO	177.95	189.8	176.5	189.8	1159800	8761100	02-08-2024	10:14:59	98.91657959	60.92133785	3182470	13752270
02-08-2024 10:20	NIFTY08AUG2424700CE.NFO	189.95	183.85	183.85	192.1	739625	8822750	02-08-2024	10:19:59	124.1154174	59.2671441	2888196.25	12578396.25
02-08-2024 10:25	NIFTY08AUG2424700CE.NFO	183.8	182.45	173.35	184.75	873675	8917875	02-08-2024	10:24:59	155.8694647	58.86214989	2784412.5	11870612.5
02-08-2024 10:30	NIFTY08AUG2424700CE.NFO	183	182.05	179.25	187.45	459050	9535975	02-08-2024	10:29:59	187.8310203	58.73864749	2602046.25	11228796.25
02-08-2024 10:35	NIFTY08AUG2424700CE.NFO	181.9	200	181.9	200	941575	9688875	02-08-2024	10:34:59	186.5155145	62.53728356	2153775	10373282.5
02-08-2024 10:40	NIFTY08AUG2424750CE.NFO	170.15	174.75	169.6	179.4	1337475	8603850	02-08-2024	10:39:59	184.6783566	54.88301335	1412371.25	8962932.5
02-08-2024 10:45	NIFTY08AUG2424750CE.NFO	175.05	170.3	166.85	176.3	681950	7885900	02-08-2024	10:44:59	184.5008322	53.6370284	1004538.75	7716790
02-08-2024 10:50	NIFTY08AUG2424750CE.NFO	170.5	178.1	167.85	179.05	455100	7681800	02-08-2024	10:49:59	183.9585131	55.54223362	773267.5	6686568.75
02-08-2024 10:55	NIFTY08AUG2424750CE.NFO	177.4	183.1	170.9	184.3	580600	7571425	02-08-2024	10:54:59	183.8710518	56.7686265	655986.25	5911530
02-08-2024 11:00	NIFTY08AUG2424750CE.NFO	182.7	185.15	176.95	186.3	673025	7636325	02-08-2024	10:59:59	183.7993714	57.28885215	634305	6214530
02-08-2024 11:05	NIFTY08AUG2424750CE.NFO	185.2	169.45	168.55	186.65	659950	7330900	02-08-2024	11:04:59	182.2453262	52.11638775	644111.25	6457238.75
02-08-2024 11:10	NIFTY08AUG2424750CE.NFO	169.45	198.65	162.25	201.4	443550	7515700	02-08-2024	11:09:59	181.8813554	59.44954508	611101.25	6470362.5
02-08-2024 11:15	NIFTY08AUG2424750CE.NFO	168.6	173.3	168	202.35	252250	7500300	02-08-2024	11:14:59	181.5873477	52.00363789	605867.5	6681855
02-08-2024 11:20	NIFTY08AUG2424750CE.NFO	173.35	173.85	169	204.45	285075	7235400	02-08-2024	11:19:59	181.4629671	52.14368616	605867.5	6864157.5
02-08-2024 11:25	NIFTY08AUG2424750CE.NFO	174.05	174.75	172.25	178.3	271950	6982600	02-08-2024	11:24:59	181.1558141	52.3885055	589722.5	6991853.75
02-08-2024 11:30	NIFTY08AUG2424750CE.NFO	175	179.7	170.95	181	290925	6944600	02-08-2024	11:29:59	180.4817816	53.78874281	570810	7188063.75
02-08-2024 11:35	NIFTY08AUG2424750CE.NFO	179.75	171	169.15	180.85	287625	6840900	02-08-2024	11:34:59	179.718236	50.95243407	549922.5	7200350
02-08-2024 11:40	NIFTY08AUG2424750CE.NFO	170.9	181.2	169.2	181.75	293175	6945250	02-08-2024	11:39:59	179.5803816	54.01406432	552416.25	7393726.25
02-08-2024 11:45	NIFTY08AUG2424750CE.NFO	181.8	181.2	179.7	186.75	427700	6720725	02-08-2024	11:44:59	179.5472151	54.01406432	568842.5	7628727.5
02-08-2024 11:50	NIFTY08AUG2424750CE.NFO	180.8	181.6	180.5	190.2	335350	6547700	02-08-2024	11:49:59	177.8909871	54.14424852	572471.25	7783497.5
02-08-2024 11:55	NIFTY08AUG2424750CE.NFO	181.45	174.65	171.35	181.75	327825	6329750	02-08-2024	11:54:59	178.4937069	51.42042829	530872.5	7661930
02-08-2024 12:00	NIFTY08AUG2424750CE.NFO	174.5	170	170	177.65	259625	6341975	02-08-2024	11:59:59	179.0866345	49.62175989	506872.5	7537891.25
02-08-2024 12:05	NIFTY08AUG2424750CE.NFO	171	195.8	168.65	200.75	359700	6968625	02-08-2024	12:04:59	179.9929585	58.33099445	481173.75	7440428.75
02-08-2024 12:10	NIFTY08AUG2424700CE.NFO	196.2	197.9	192.7	200.9	219350	7263525	02-08-2024	12:09:59	180.7525491	58.95301189	469188.75	7326806.25
02-08-2024 12:15	NIFTY08AUG2424700CE.NFO	197.55	196.2	193.05	200	226925	7418775	02-08-2024	12:14:59	181.1930683	58.19566582	433456.25	7213301.25
02-08-2024 12:20	NIFTY08AUG2424700CE.NFO	195.85	191.6	189.1	199	219075	7498850	02-08-2024	12:19:59	182.7045526	56.09570317	377536.25	7158051.25
02-08-2024 12:25	NIFTY08AUG2424700CE.NFO	192	191.15	187	195.4	313500	7495025	02-08-2024	12:24:59	182.8328456	55.88326036	359113.75	7138507.5
02-08-2024 12:30	NIFTY08AUG2424700CE.NFO	190.75	180.5	177.3	192.4	400125	7543100	02-08-2024	12:29:59	182.9733114	50.9640216	356365	7131572.5
02-08-2024 12:35	NIFTY08AUG2424700CE.NFO	181.3	177	176.55	182	337325	7644200	02-08-2024	12:34:59	182.6780484	49.42423944	344201.25	7135211.25
02-08-2024 12:40	NIFTY08AUG2424700CE.NFO	177.7	179.7	175.2	183.4	456600	8084900	02-08-2024	12:39:59	182.7998854	50.6626143	333380	7157640
02-08-2024 12:45	NIFTY08AUG2424700CE.NFO	179.25	203.55	174	205.65	242750	7197300	02-08-2024	12:44:59	183.7432795	59.98351611	312520	7150960
02-08-2024 12:50	NIFTY08AUG2424650CE.NFO	203.7	199.35	198.45	204.45	83025	2083200	02-08-2024	12:49:59	184.7006808	57.90873877	294493.75	6879335
02-08-2024 12:55	NIFTY08AUG2424650CE.NFO	199.35	208	199.35	208	50850	2122100	02-08-2024	12:54:59	185.4480098	60.90777343	284423.75	6610425
02-08-2024 13:00	NIFTY08AUG2424700CE.NFO	177.65	182.25	176	184.9	380050	9075350	02-08-2024	12:59:59	185.3454512	49.58217989	289172.5	6702422.5
02-08-2024 13:05	NIFTY08AUG2424700CE.NFO	183	183.45	181.8	187.95	458275	9087225	02-08-2024	13:04:59	185.3418492	50.04833124	298488.75	6807653.75
02-08-2024 13:10	NIFTY08AUG2424700CE.NFO	182.9	184.95	180.6	186.2	200925	8978950	02-08-2024	13:09:59	186.0080538	50.66239804	293988.75	6909371.25
02-08-2024 13:15	NIFTY08AUG2424700CE.NFO	184.65	181.55	178.6	185.35	282475	8996000	02-08-2024	13:14:59	186.5551633	49.1864092	293731.25	7017126.25
02-08-2024 13:20	NIFTY08AUG2424700CE.NFO	181	176.75	174.7	183.75	393500	8904875	02-08-2024	13:19:59	185.6471044	47.10015755	298747.5	7115107.5
02-08-2024 13:25	NIFTY08AUG2424700CE.NFO	176.5	177.05	173.6	179.45	319350	8908100	02-08-2024	13:24:59	184.4135689	47.25074978	293330	7224476.25
02-08-2024 13:30	NIFTY08AUG2424700CE.NFO	177.45	183.85	177.05	184.6	244225	8984475	02-08-2024	13:29:59	183.6481826	50.6781136	288773.75	7346315
02-08-2024 13:35	NIFTY08AUG2424700CE.NFO	183.6	177	176.85	186	321750	9039300	02-08-2024	13:34:59	182.9146355	47.34116727	288470	7481792.5
02-08-2024 13:40	NIFTY08AUG2424700CE.NFO	175.9	191.6	175.9	192.75	539200	9036300	02-08-2024	13:39:59	182.8033487	54.25500708	302448.75	7616508.75
02-08-2024 13:45	NIFTY08AUG2424700CE.NFO	191.65	190.55	189.8	197.6	562600	8774925	02-08-2024	13:44:59	183.8912001	53.70885312	312593.75	7706823.75
02-08-2024 13:50	NIFTY08AUG2424700CE.NFO	190.7	189.8	187.3	193.8	218025	8503275	02-08-2024	13:49:59	184.5665289	53.29615943	312527.5	7768811.25
02-08-2024 13:55	NIFTY08AUG2424700CE.NFO	190.45	186.25	186	192	233475	8433750	02-08-2024	13:54:59	185.2651097	51.28732666	312855	7819560
02-08-2024 14:00	NIFTY08AUG2424700CE.NFO	186.25	192.3	186.25	195.9	276950	8442850	02-08-2024	13:59:59	185.1565899	54.4390789	315748.75	7866760
02-08-2024 14:05	NIFTY08AUG2424700CE.NFO	191.75	191.15	188.55	195.3	202475	8462925	02-08-2024	14:04:59	185.1616036	53.72748249	310197.5	7915155
02-08-2024 14:10	NIFTY08AUG2424700CE.NFO	191.45	178.8	177	195.8	500650	8361350	02-08-2024	14:09:59	184.837675	46.67190866	315223.75	7956067.5
02-08-2024 14:15	NIFTY08AUG2424700CE.NFO	180.25	175.6	172.25	181.45	396450	8432625	02-08-2024	14:14:59	184.4702428	45.02211568	318180	7995488.75
02-08-2024 14:20	NIFTY08AUG2424700CE.NFO	176	208.75	169.4	209	294150	6107450	02-08-2024	14:19:59	185.140157	60.57122233	310057.5	7896616.25
02-08-2024 14:25	NIFTY08AUG2424700CE.NFO	178.3	175.85	175.15	184	455350	8831075	02-08-2024	14:24:59	184.5956308	46.51154798	320687.5	7978305
02-08-2024 14:30	NIFTY08AUG2424700CE.NFO	175.65	177.05	174.2	179	252675	8918775	02-08-2024	14:29:59	184.3649352	46.9948262	329170	8320083.75
02-08-2024 14:35	NIFTY08AUG2424700CE.NFO	177.05	192.1	170.55	200.65	263275	7770475	02-08-2024	14:34:59	185.0032048	52.75969962	339791.25	8602502.5
02-08-2024 14:40	NIFTY08AUG2424650CE.NFO	191.9	178.6	176.4	194.6	228075	2374775	02-08-2024	14:39:59	185.452236	47.74357413	332192.5	8267473.75
02-08-2024 14:45	NIFTY08AUG2424650CE.NFO	178.9	178.65	178.2	187.75	146525	2407050	02-08-2024	14:44:59	185.5155298	47.76338311	316605	7933465
02-08-2024 14:50	NIFTY08AUG2424650CE.NFO	179.1	173.3	173.3	207	189175	2982750	02-08-2024	14:49:59	185.8527614	45.76435833	316017.5	7633655
02-08-2024 14:55	NIFTY08AUG2424600CE.NFO	202.3	200.55	171.85	205.25	276000	3725425	02-08-2024	14:54:59	186.1562962	55.89066383	315693.75	7370126.25
02-08-2024 15:00	NIFTY08AUG2424600CE.NFO	201.05	199.4	193	201.5	153500	4152725	02-08-2024	14:59:59	185.7059467	55.4203889	303693.75	7132518.75
02-08-2024 15:05	NIFTY08AUG2424600CE.NFO	199.25	199.25	173.5	200.95	511275	4272450	02-08-2024	15:04:59	186.1224755	55.35496338	313290	6900736.25
02-08-2024 15:10	NIFTY08AUG2424600CE.NFO	200.2	200.85	166.6	210.65	375025	3808850	02-08-2024	15:09:59	186.5667755	55.95229343	319830	6641955
02-08-2024 15:15	NIFTY08AUG2424650CE.NFO	172.4	203.85	171.05	204.05	228000	4063325	02-08-2024	15:14:59	186.5894322	57.11099895	315142.5	6393156.25
02-08-2024 15:20	NIFTY08AUG2424650CE.NFO	175.35	204.4	168.3	206.3	242600	3908350	02-08-2024	15:19:59	186.7062554	57.33260012	300312.5	6136758.75
02-08-2024 15:25	NIFTY08AUG2424600CE.NFO	204.65	203.3	169.35	207.8	230025	3770150	02-08-2024	15:24:59	187.4088643	56.70159039	283683.75	5886520
02-08-2024 15:30	NIFTY08AUG2424600CE.NFO	204.7	190	190	205	167375	4011350	02-08-2024	15:29:59	188.8097566	49.59421753	281151.25	5661923.75
05-08-2024 09:20	NIFTY08AUG2424450CE.NFO	105.6	199.2	99.85	216.5	508450	448150	05-08-2024	09:19:59	186.2892842	53.89894438	294900	5262643.75

Hey, take a look a this topic here:
https://community.plotly.com/t/how-to-remove-these-empty-spaces-in-candle-stick/55566/4
:thinking:

Hey @JuanG I’m able to remove timestamp gaps. The problem here is when I use both Values & Time range it is breaking candle stick chart (please refer image)

How can I solve that issue ?

Hey @velkumar10 , I was trying to replicate your plot with your data and if I’m correct, I guess you want to make a candlestick hourly. If that is correct and if I’m not wrong, then you have to resample your data hourly (I haven’t tried it yet, I don’t have time until afternoon, but I will). I suppose you need to have 1 observation (row) by hour with open, close, low and high; but in your data you have 5min observations per row. So, what I’ll do it is reconstruct the index with date hourly and then try to plot it. What do you think?
Let me know…

1 Like

Hi @JuanG

I’m trying to plot 5min data not hourly.

I tried resampling to 1H, below is the result

Am I doing any mistake in code

I’ve plotted just out of the box…

Code
fig2 = go.Figure(data=[go.Candlestick(
        x=df_candle['timestamp'],
        open=df_candle['open'],
        high=df_candle['high'],
        low=df_candle['low'],
        close=df_candle['close']
    )])
fig2

Maybe, the difference was that I copy, pasted your entry data and parsed with excel, then saved it as .csv and then read it with pandas…

Pay a visit to this thread, maybe it help you with some inspirational idea…
[Plotly Community Forum] [:bar_chart: Plotly Python] Sharing a Plotly project for chart analysis…