NexusFi: Find Your Edge


Home Menu

 





Kline Candlestick Time Interval Formula


Discussion in Traders Hideout

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




 
Search this Thread
  #1 (permalink)
 
nothingbutprofits's Avatar
 nothingbutprofits 
rochester new york/USA
 
Experience: Advanced
Platform: ThinkOrSwim & NT
Broker: NT, TOS
Trading: ES NQ RTY CL NG
Posts: 78 since Feb 2021
Thanks Given: 245
Thanks Received: 50

Hi everyone,

I'm working on my own data analysis using the ticks OCHLV data which I converted to 1m OCHLV records.

I'm wondering if it's possible for anyone to provide the feedback on the candlestick equations to make sure that the details below is correct.

Time Intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
Interval time formats: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 1w, 1M

OCHLV:
O = Open
C = Close
H = High
L = Low
V = Volume

If the interval time request is 3m (3 minutes), it means that the 1m OCHLV data will pull 3 (THREE) 1m OCHLV records from database, then use the OCHLV formulas (see below) to calculate the 1m OCHLV values in order to display the 3m OCHLV values.

OCHLV Formulas: (based on n as total minutes request.)

Example: 3m = n, which n would be 3, only used for reference here.

1st 1m O + 2nd 1m O + 3rd 1m O = 3m Open
n (based on 3m)

1st 1m C + 2nd 1m C + 3rd 1m C = 3m Close
n (based on 3m)

1st 1m H + 2nd 1m H + 3rd 1m H = 3m High
n (based on 3m)

1st 1m L + 2nd 1m L + 3rd 1m L = 3m Low
n (based on 3m)

1st 1m V + 2nd 1m V + 3rd 1m V + nV = 3m Total Volume based on n minutes

Please let me know if the above information is correct.

Thanks!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
MegaETH Proves the Crowd Right: Prediction Markets Calle …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
The Feds Stagflation Trap -- Negative Payrolls, $91 Oil, …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
 hedgeplay 
Austin Texas / US
 
Experience: Intermediate
Frequency: Several times daily
Duration: Seconds
Posts: 216 since Dec 2019
Thanks Given: 159
Thanks Received: 241

Hi,

Just wanted to add a few ideas as food for thought.

If I read your post correctly.

----------------------------

Keep of count of 1min bars as they pass so you know when you see a "1m" and a "3m" bar.


Then:

For High and Low it is not addition of the three but which was the Highest and which one of the three was the Lowest.

So set "1m" as the starting High and Low and check of the next two bars to see if the "1m" gets disrupted from either the High or Low position.


For Open is just one of the three bars, Open on the "1m".

For Close is just one of the three bars, Close on the "3m".


HedgePlay


Reply With Quote
  #3 (permalink)
 hedgeplay 
Austin Texas / US
 
Experience: Intermediate
Frequency: Several times daily
Duration: Seconds
Posts: 216 since Dec 2019
Thanks Given: 159
Thanks Received: 241


Bonus round!

Beyond what you asked if I was going to go to all the trouble you list in your post I would consider adding the two additional series.

A classic problem with OCHL bars is they, depending on how you are using them, are sometimes inaccurate because they "Lose" range of movement when price jumps / gaps between the Close of one bar and Open of the next.

If you want full range of movement create then create a True Range OHLC, use the same formulas use to derive "True Range".

The Open for your three minute bar is not the Open of 1m but the Close of the just previous 3m bar. This way all the range that happened since the last 3m bar will be included in this new 3m bar.

HedgePlay


Reply With Quote
  #4 (permalink)
 
nothingbutprofits's Avatar
 nothingbutprofits 
rochester new york/USA
 
Experience: Advanced
Platform: ThinkOrSwim & NT
Broker: NT, TOS
Trading: ES NQ RTY CL NG
Posts: 78 since Feb 2021
Thanks Given: 245
Thanks Received: 50


hedgeplay View Post
Bonus round!

Beyond what you asked if I was going to go to all the trouble you list in your post I would consider adding the two additional series.

A classic problem with OCHL bars is they, depending on how you are using them, are sometimes inaccurate because they "Lose" range of movement when price jumps / gaps between the Close of one bar and Open of the next.

If you want full range of movement create then create a True Range OHLC, use the same formulas use to derive "True Range".

The Open for your three minute bar is not the Open of 1m but the Close of the just previous 3m bar. This way all the range that happened since the last 3m bar will be included in this new 3m bar.

HedgePlay

Thanks for the clarification. I understand clearly.

Here are the pictures I drew up based on your description, which makes sense.





Many thanks!


Started this thread Reply With Quote




Last Updated on April 3, 2021


© 2026 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 - Downloads - Top
no new posts