ST0P
"ST0P" by KivancOzbilgic, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: ST0P (v1.0), read 2026-10-12T16:06:01.941Z; source language v4.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
ST0P by KivancOzbilgic, ported from Pine v4. Overlay indicator with 4 plots, 2 marker series, 2 fills, alerts and 6 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © KivancOzbilgic
// ------------------------------------------------------------------------------------------------
// Original author: KivancOzbilgic
// Original title: ST0P
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 4
// Fetched: 2026-10-12
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
// Converted by the FloScript converter from a Pine-compatible v4 source.
indicator("ST0P", overlay=true)
Percent = input.float(title="Percent", defval=3)
src = input(close, title="Source")
changeLONGSHORT = input.int(title="LONG=1 SHORT=2", minval=1, maxval=2, defval=1)
KADEME = input.float(title="Unit", step=0.1, defval=0.0)
showsignals = input.bool(title="Show ST0P Signals ?", defval=true)
highlighting = input.bool(title="Highlighter On/Off ?", defval=true)
SHORT = src + KADEME + src * Percent / 100
SHORTprev = nz(SHORT[1], SHORT)
SUB = 0.0
SUB := SHORT < nz(SUB[1]) or src[1] > nz(SUB[1]) ? SHORT : nz(SUB[1])
LONG = src - KADEME - src * Percent / 100
LONGprev = nz(LONG[1], LONG)
SLB = 0.0
SLB := LONG > nz(SLB[1]) or src[1] < nz(SLB[1]) ? LONG : nz(SLB[1])
ST0P = changeLONGSHORT == 1 ? SLB : SUB
longFillColor = highlighting ? (changeLONGSHORT == 1 ? color.green : color.white) : color.white
shortFillColor = highlighting ? (changeLONGSHORT == 2 ? color.red : color.white) : color.white
col12 = ST0P > ST0P[1]
col32 = ST0P < ST0P[1]
color2 = col12 ? color.green : col32 ? color.red : #001AE1
fill(plot(ohlc4, title="", style=plot.style_circles, linewidth=0), plot(ST0P, color=color2, linewidth=3), title="LONG Highligter", color=longFillColor)
fill(plot(ohlc4, title="", style=plot.style_circles, linewidth=0), plot(ST0P, color=color2, linewidth=3), title="SHORT Highligter", color=shortFillColor)
alertcondition(changeLONGSHORT == 1 and ta.crossunder(src, ST0P), title="LONG POSITION ST0P!", message="SELL!")
alertcondition(changeLONGSHORT == 2 and ta.crossover(src, ST0P), title="SHORT POSITION ST0P!", message="BUY!")
plotshape(changeLONGSHORT == 2 and ta.crossover(src, ST0P) and showsignals ? SHORT : na, title="Buy", text="ST0P", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.white)
plotshape(changeLONGSHORT == 1 and ta.crossunder(src, ST0P) and showsignals ? LONG : na, title="Sell", text="ST0P", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, 0), textcolor=color.white)
This file is under the Mozilla Public License 2.0; it is a port of the original by KivancOzbilgic, with the original licence header kept and the changes made for FloScript noted in the file.
- v2
Library refresh 2026-10-14
- v1
Library refresh 2026-10-12
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.