Untitled
"TASC 2022.12 Short-Term Continuation And Reversal Signals" by PineCodersTASC, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: TASC 2022.12 Short-Term Continuation And Reversal Signals (v2.0), read 2026-11-15T18:32:58.839Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
TASC 2022.12 Short-Term Continuation And Reversal Signals by PineCodersTASC, ported from Pine v5. Pane indicator with 5 plots, 8 marker series, 1 fill, 3 levels, bar/background colouring and 13 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2022-11-15; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
// TASC Issue: December 2022 - Vol. 40, Issue 13
// Article: Short-Term Continuation And Reversal Signals
// Article By: Barbara Star
// Language: Pine-compatible v5
// Provided By: PineCoders, for tradingview.com
// ------------------------------------------------------------------------------------------------
// Original author: PineCodersTASC
// Original title: TASC 2022.12 Short-Term Continuation And Reversal Signals
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 5
// Fetched: 2026-11-15
// 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
string title = 'TASC 2022.12 ' + 'Short-Term Continuation And Reversal Signals'
string stitle = 'TASC 2022.12'
indicator(title, stitle, false)
// Constant variables:
string XP0 = shape.arrowdown
string XP5 = shape.flag
string XP1 = shape.arrowup
string XP6 = shape.square
string XP2 = shape.circle
string XP7 = shape.triangledown
string XP3 = shape.cross
string XP8 = shape.triangleup
string XP4 = shape.diamond
string XP9 = shape.xcross
string LTOP = location.top
string LABAR = location.abovebar
string LBOT = location.bottom
string LBBAR = location.belowbar
string SZ = size.tiny
string LDASH = line.style_dashed
PH = plot.style_histogram
color CGRAY = #555522
// Input panel groups, titles and inline references:
string g00 = 'Input Options:'
string g01 = 'Style Options:'
string it0 = 'Continuity Signals:'
string it1 = 'CCI Signals: '
string it2 = 'Oscillator Mode:'
string it3 = 'DMI Colors: '
string it4 = 'DMI Multiplier: '
string MD0 = 'DMI'
string MD2 = 'Dual'
string MD1 = 'CCI'
string MD3 = 'Overlay'
// Input options:
string mode = input.string(MD2, it2, [MD0, MD1, MD2, MD3], group=g00)
float DMIMult = input.float(1.0, it4, step=0.25, group=g00)
int diLength = input.int(10, 'DMI Length:', group=g00)
int maLength = input.int(18, 'MA Length:', group=g00)
int cciLength = input.int(13, 'CCI Length:', group=g00)
// Style options:
color colDMIUp = input.color(#22AA22, it3, '', it3, g01)
color colDMIDo = input.color(#AA2222, '', '', it3, g01)
string shapeCon = input.string(XP2, it0, [XP0, XP1, XP2, XP3, XP4, XP5, XP6, XP7, XP8, XP9], '', it0, g01)
color colConUpTrend = input.color(#5188FF, '', '', it0, g01)
color colConDoTrend = input.color(#771515, '', '', it0, g01)
string shapeCCI = input.string(XP4, it1, [XP0, XP1, XP2, XP3, XP4, XP5, XP6, XP7, XP8, XP9], '', it1, g01)
color colCCITop = input.color(#BB00FF, '', '', it1, g01)
color colCCIBot = input.color(#FFBB00, '', '', it1, g01)
// Indicators:
float ma = ta.sma(close, maLength)
[dp, dm, _] = ta.dmi(diLength, 1)
float DMI = dp - dm
float mDMI = DMIMult * DMI
float CCI = ta.cci(close, cciLength)
float uCCI = CCI > +100.0 ? CCI : na
float lCCI = CCI < -100.0 ? CCI : na
// Boolean Signals:
bool pGTma = close > ma
bool pLTma = close < ma
bool cciGTp100 = CCI > 100
bool cciLTm100 = CCI < -100
bool dmiGT0 = DMI > 0
bool dmiLT0 = DMI < 0
bool risingL = low > low[1] and low[1] > low[2]
bool falingH = high < high[1] and high[1] < high[2]
bool conUpTrend = pGTma and dmiGT0 and risingL
bool conDoTrend = pLTma and dmiLT0 and falingH
bool cciTop = not cciGTp100 and cciGTp100[1] and cciGTp100[2]
bool cciBot = not cciLTm100 and cciLTm100[1] and cciLTm100[2]
bool useDMI = mode == MD0 or mode == MD2
bool useCCI = mode == MD1 or mode == MD2
bool isOverlay = mode == MD3
// Color variation:
color colDMI = switch
dmiGT0 => colDMIUp
dmiLT0 => colDMIDo
=> CGRAY
color colCCI = switch
cciGTp100 => colCCITop
cciLTm100 => colCCIBot
=> CGRAY
// Output:
showDMI = useDMI ? display.all : display.none
showCCI = useCCI ? display.all : display.none
showLVL = isOverlay ? display.none : display.all
showOverlay = isOverlay ? display.all : display.none
// Oscillator signals:
plotshape(conUpTrend, it0, shapeCon, LBOT, colConUpTrend, size=SZ, display=showLVL)
plotshape(conDoTrend, it0, shapeCon, LTOP, colConDoTrend, size=SZ, display=showLVL)
plotshape(cciTop, it1, shapeCCI, LTOP, colCCITop, size=SZ, display=showLVL)
plotshape(cciBot, it1, shapeCCI, LBOT, colCCIBot, size=SZ, display=showLVL)
// Overlaid signals:
plotshape(conUpTrend, it0, shapeCon, LBBAR, colConUpTrend, size=SZ, display=showOverlay)
plotshape(conDoTrend, it0, shapeCon, LABAR, colConDoTrend, size=SZ, display=showOverlay)
plotshape(cciTop, it1, shapeCCI, LABAR, colCCITop, size=SZ, display=showOverlay)
plotshape(cciBot, it1, shapeCCI, LBBAR, colCCIBot, size=SZ, display=showOverlay)
// Plots:
plot(mDMI, 'DMI Histogram', colDMI, 4, PH, display=showDMI)
plot(mDMI, 'DMI', CGRAY, display=showDMI)
plot(uCCI, 'CCI+', colCCI, 2, PH, false, +100, display=showCCI)
plot(lCCI, 'CCI-', colCCI, 2, PH, false, -100, display=showCCI)
plot(CCI, 'CCI', #BBFFFF, 2, display=showCCI)
hline(0, 'LVL0', CGRAY, display=showLVL)
h1 = hline(+100, "100", CGRAY, display=showCCI)
h2 = hline(-100, "100", CGRAY, display=showCCI)
fill(h1, h2, color.new(CGRAY, 90))
barcolor(colDMI, editable=true, title='barcolor')
This file is under the Mozilla Public License 2.0; it is a port of the original by PineCodersTASC, with the original licence header kept and the changes made for FloScript noted in the file.
- v1
Library refresh 2026-11-15
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.