Open-source scriptindicator/v1
Fisher Transform
Transform normalized median price to make turning points more distinct on an unbounded scale.
#fisher-transform#momentum#oscillator
Description
The Fisher Transform normalizes median price inside its recent range and applies a logarithmic transform. This reshapes the distribution so extreme readings and changes in direction can stand out more clearly.
Open-source script. Everyone can inspect the source code, use the script on a chart, and save an editable copy.
Release notes
Version history · 1 published version
Version 1CurrentChart updatedFisher Transform · Aug 31, 2026
Source codempl-2.0View sourceHide source
indicator("Fisher Transform", { overlay: false });
const length = input.int("Length", 9, { min: 2, max: 200 });
const hi = highest(hl2, length);
const lo = lowest(hl2, length);
const value = [];
const fisher = [];
for (let i = 0; i < close.length; i++) {
if (!isFinite(hi[i]) || !isFinite(lo[i])) {
value.push(NaN);
fisher.push(NaN);
continue;
}
const normalized = hi[i] === lo[i] ? 0 : 2 * ((hl2[i] - lo[i]) / (hi[i] - lo[i]) - 0.5);
const previousValue = i > 0 && isFinite(value[i - 1]) ? value[i - 1] : 0;
const currentValue = Math.max(-0.999, Math.min(0.999, 0.33 * normalized + 0.67 * previousValue));
const previousFisher = i > 0 && isFinite(fisher[i - 1]) ? fisher[i - 1] : 0;
value.push(currentValue);
fisher.push(0.5 * Math.log((1 + currentValue) / (1 - currentValue)) + 0.5 * previousFisher);
}
plot(fisher, { title: "Fisher", color: "#2962ff", lineWidth: 2 });
plot(fisher.map((_, i) => i === 0 ? NaN : fisher[i - 1]), { title: "Trigger", color: "#ff6d00" });
hline(0, { title: "Zero", color: "#78909c", style: "dotted" });
Community discussion
0 comments
No comments yet. Start the discussion.