My Chart [Herman]---
## TITLE
My Chart
---
## DESCRIPTION
```
OVERVIEW
My Chart is a chart-identification badge with a hidden note attached to it. On the
chart it shows up to three compact lines - the symbol, the current timeframe, and a
short line of your own text. When you move the mouse pointer over the badge, a
tooltip opens containing a longer block of text you have written yourself, and closes
again when the pointer leaves.
The problem it addresses is a practical one. Traders who work from a written process
- a pre-trade checklist, a set of session rules, a reminder of the bias they decided
on before the open - normally keep that text somewhere off the chart, in a note app
or on a second screen, or they paste it onto the chart as a text drawing. Neither
works well. Text kept elsewhere is out of sight at the exact moment it matters, and
text pasted on the chart clutters the workspace permanently to serve a reading that
is only needed for a few seconds before an entry.
This script's approach is to keep almost nothing on the chart and put the full text
one hover away. The visible badge stays small. The detail lives in the tooltip and
appears on demand.
WHAT MAKES IT DIFFERENT
A standard watermark prints fixed information in a fixed way and is not interactive.
This script turns the same corner of the chart into a container that holds three
things at once: chart identity, a short label, and an on-demand body of text - with
independent styling for each visible line, nine anchor positions, per-row visibility,
and a text-wrapping routine that stops long notes from stretching the badge across
the chart.
HOW IT WORKS
The badge is a single-column table drawn once, on the most recent bar. It performs no
market calculation of any kind. It draws no levels, produces no signals, and reads no
data beyond the symbol name and the chart's timeframe. Everything it displays is
either taken from the chart context or typed in by the user.
Ticker row
By default the script reads the chart's symbol from built-in symbol information.
Switching the ticker source to Custom lets you type your own label instead. This is
useful on continuous futures contracts, where a plain "NQ" reads better than the
exchange's contract string, or on spreads and renamed symbols.
Timeframe row
The chart's timeframe is read from the built-in timeframe variables and normalised
into a short form: ticks as T, seconds as s, minutes as m, whole hours as h, and
D / W / M for daily, weekly and monthly. A 240-minute chart is therefore shown as 4h
rather than 240m, while a value that is not a whole number of hours, such as 45,
stays in minutes.
Custom text row
A free text field, meant to stay short: a header for the checklist behind it, the
name of the session you are trading, or a single rule you want in view.
Each of the three rows can be switched off individually, and the rows are assembled
dynamically - a row that is switched off is removed from the badge rather than left
as an empty gap. A ticker-only badge, a timeframe-only badge, or a note-only badge
are all valid configurations.
Automatic wrapping
Long custom text would stretch the table sideways, so the script includes its own
wrapping routine rather than relying on the user to insert line breaks. It splits the
text into tokens at spaces, assembles lines up to the character limit you choose
(8 to 60), preserves any line breaks you typed manually, and hard-splits a single
token that is longer than the limit - so an unbroken string cannot widen the badge
either. Wrapping can be switched off if you prefer to control every break by hand.
The hover tooltip
The tooltip contains only the text entered in the Additional tooltip text field.
Nothing is copied into it from the rows above, so the visible badge and the hidden
note are written independently. The field accepts line breaks, so the tooltip can
hold a structured list rather than one paragraph. This is where the longer content
belongs: an entry checklist, risk rules, a description of the setup you are waiting
for, or session times.
Styling
Content and appearance are kept separate so the badge can be matched to any theme:
- Nine anchor positions (three columns by three rows of the chart area).
- Background colour and outer frame colour, each with its own transparency value.
- Frame width from 0 to 4; 0 removes the frame for a borderless look.
- Independent text colour for the ticker, the timeframe and the custom text.
- Eight typography presets, combining the two font families Pine supports (system and
monospace) with bold and italic variants.
- Independent text size for each row.
Switching the badge off clears the table and its background and frame, rather than
leaving an empty box on the chart.
HOW TO USE IT
1. Add the script and open its settings.
2. Under Content, switch off any row you do not want, and type the short label you
want permanently visible.
3. Under Hover Tooltip, type the full text you want hidden behind the hover. Use
blank lines to separate sections so it stays readable.
4. Under Position, move the badge to a corner that does not overlap your other tools.
5. Under Style and Typography, match the colours to your theme. On a dark chart,
start from a dark background with light text.
6. Hover over the badge to read the note.
If you want two separate notes on one chart, add the script twice and give each copy
a different position.
A NOTE ON THE CODE
The cell-drawing function contains one branch per typography preset, which looks
repetitive at first reading. This is deliberate: the text_font_family and
text_formatting parameters require constant arguments, so the values cannot be
assembled at runtime from the user's selection and each preset needs its own call
with literal constants.
LIMITATIONS YOU SHOULD KNOW ABOUT
- This is a display tool only. It does not analyse price, does not generate signals
or alerts, and nothing it shows carries any analytical or predictive meaning. It
cannot tell you what to trade; it can only keep your own written process in view.
- The tooltip needs a mouse pointer. On touch devices and in the mobile app there is
no hover state, so tooltip content may not be reachable there. It also does not
appear in chart snapshots or exported images. If you need the text visible in a
screenshot, put it in the custom text row instead of the tooltip.
- The badge is drawn only on the most recent bar. It is not historical and does not
change as you scroll back through the chart.
- Wrapping counts characters, not pixel width. With the proportional system font,
lines of equal character count will not be exactly equal in width. The monospace
presets give the most even result.
- The badge uses one of the nine standard table anchors. Other indicators placing
tables in the same corner will stack with it; move one of them if they collide.
- Colours are not theme-aware. Switching between a light and a dark chart requires
setting the colours again.
- The tooltip text is shared by the whole badge; individual rows do not have separate
tooltips.
- Very long tooltip text will be cut off by the platform's tooltip display, so keep
it to a length that can be read at a glance.
The script displays only information you supply and information already present on
the chart. It makes no claim about future price behaviour and is not trading advice.
The source is published under the Mozilla Public License 2.0. If you reuse it, the
House Rules on open-source reuse apply: credit the original author in your
publication's description, make significant improvements to the code base, and
publish your own script open-source.
```
---
## WHAT CHANGED IN THE CODE
1. Standard licence header plus the `© helmans13` attribution line, and a header
block stating the reuse terms.
2. Title and shorttitle are now `My Chart `, so the tag is permanently
visible in every user's chart legend.
3. New per-row visibility toggles: **Show ticker** and **Show timeframe**, alongside
the existing **Show custom text**.
4. Rows are now assembled dynamically with a running row counter. This replaces the
old placeholder cell (`text_size = 1`) used when the custom text row was hidden,
which left a thin sliver in the badge.
5. `table.clear` now runs before every redraw, so hidden rows leave no residue.
6. The badge auto-hides when every row is switched off, instead of drawing an empty
framed box.
7. Explanatory comment above `f_drawCell` so reviewers understand why the branches
are repetitive.
8. Removed the check-mark characters from the default tooltip text in favour of plain
hyphens, keeping the source fully 7-bit ASCII.
---
Indicator













