Initial Balance - Any Duration, Session, Periodicity

Login or Register

Please login or register in order to view and post in the Forum.

1 post / 0 new
cpayne
Last seen: 1 year 9 months ago
Joined: 03/30/2009 - 00:00
Initial Balance - Any Duration, Session, Periodicity

This post explains how to implement initial balance high and low lines which can be set to any duration (in minutes, most commonly 60 minutes) and operate on the day session independent of the session and the periodicity of the chart.

Chart Definition: https://www.linnsoft.com/charts/cp-initbal-dynamic-es

Use the button at the top to change the duration (in minutes) of the Initial Balance.  Chart above is set to a 10-minute periodicity, but even a 1-minute initial balance will work fine regardless of the periodicity of the chart.  The initial balance also operates on the day session data independent of the session of the chart (chart above is set to full session).  The chart above also has a PaintBar indicator which grays the background during the overnight session.

Technical Details....

The IBH is implemented using a Custom Indicator with syntax....

MPD

The use of MPD is key to both locking the indicator to the Day Session as well as making it periodicity independent.  By setting MPD to Mix Periodicity: 1 Minute, the indicator will always work on 1-minute data regardless of the periodicity of the chart.

And the "Mix Session: Day" locks limits the indicator to computing off only the day session data.

The embedded SESST settings are seen below and compute the highest high of the first C#21 minutes of the session (day session).  C#21 is controlled by the button at the top of the chart.  If you drag and drop the lines above to another chart, you'll also need to copy and paste the "IB Min" button at the top to the new chart (right-click on button and "Copy" then go paste into the new chart).

0