ShareGenius Swing Trading (SST) 20 days low
20 days high
target to set
special thanks to Shri Mahesh Chander Kaushik and Shri Krishan
Buscar en scripts para "黄金近20年走势"
Bullish & Bearish Reversal Pattern with Sequential Bars20 Bollinger Bands and custom Stochasti_MTM Setup
Both long and short reversal signals.
EMA/SMA + Multi-Timeframe Dashboard (Vertical)20/50 ema and 200 sma
The EMA SMA Trading Indicator combines the power of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to help traders identify trends, reversals, and key entry/exit points.
Features:
Dual Moving Averages: Tracks both EMA and SMA to provide a balanced view of short-term and long-term market trends.
Customizable Periods: Allows users to set unique periods for EMA and SMA to suit their trading style and timeframe (e.g., day trading, swing trading, or investing).
Cross Alerts: Highlights EMA and SMA crossover points, which often indicate potential buy or sell signals.
Color-Coded Lines: Visual differentiation between EMA (dynamic and responsive) and SMA (smooth and lagging) for better readability.
Multi-Timeframe Compatibility: Suitable for scalping, intraday trading, and long-term analysis.
Usage:
Trend Confirmation: When the EMA is above the SMA, it signals a bullish trend; when it is below the SMA, it signals a bearish trend.
Crossover Strategy: Use crossovers as potential buy (EMA crosses above SMA) or sell (EMA crosses below SMA) signals.
Dynamic Support/Resistance: EMA can act as short-term support/resistance, while SMA represents long-term levels.
This indicator is perfect for traders who want to combine EMA's speed with SMA's stability for improved decision-making in volatile markets. Customizable alerts and visual cues make it user-friendly for beginners and experienced traders.
Make informed decisions and take your trading to the next level with the EMA SMA Trading Indicator!
6 Bollinger Bands (1.5 thru 4)20 period SMA Bollinger Bands with the following standard deviations: 1.5 2 2.5 3 3.5 4
[e2] Color Gradient Function20 step red/green gradient function
The color gradient function allow colorize any source in 5% steps.
Define the source, minimum and maximum value (constant or , for example, bb (or any other channel)).
Rounded Bottom Breakout Strategy Moving Averages20-day SMA , 34-day EMA , 50-day SMA and 200-day SMA moving average indicator based on Rick Saddler's Rounded Bottom Reversal Breakout Strategy
Noro's Fishnet Strategy20 lines are JMA. Green color - a uptrend. Red color - a downtrend.
Color filter
If this checkbox is chosen, then long positions will be open only if a red candle. Short positions will open if a green candle.
If this checkbox is not chosen, then positions will open at change of a trend. Color of a candle will not matter.
20 years old Turtles strategy still work!!original idea from «Way of the Turtle: The Secret Methods that Turned Ordinary People into Legendary Traders» (2007) CURTIS FAITH
920 Order Flow SATY ATR//@version=6
indicator("Order-Flow / Volume Signals (No L2)", overlay=true)
//======================
// Inputs
//======================
rvolLen = input.int(20, "Relative Volume Lookback", minval=5)
rvolMin = input.float(1.1, "Min Relative Volume (× avg)", step=0.1)
wrbLen = input.int(20, "Wide-Range Lookback", minval=5)
wrbMult = input.float(1, "Wide-Range Multiplier", step=0.1)
upperCloseQ = input.float(0.60, "Close near High (0-1)", minval=0.0, maxval=1.0)
lowerCloseQ = input.float(0.40, "Close near Low (0-1)", minval=0.0, maxval=1.0)
cdLen = input.int(25, "Rolling CumDelta Window", minval=5)
useVWAP = input.bool(true, "Use VWAP Bias Filter")
showSignals = input.bool(true, "Show Long/Short OF Triangles")
//======================
// Core helpers
//======================
rng = high - low
tr = ta.tr(true)
avgTR = ta.sma(tr, wrbLen)
wrb = rng > wrbMult * avgTR
// Relative Volume
volAvg = ta.sma(volume, rvolLen)
rvol = volAvg > 0 ? volume / volAvg : 0.0
// Close location in bar (0..1)
clo = rng > 0 ? (close - low) / rng : 0.5
// VWAP (session) + SMAs
vwap = ta.vwap(close)
sma9 = ta.sma(close, 9)
sma20 = ta.sma(close, 20)
sma200= ta.sma(close, 200)
// CumDelta proxy (uptick/downtick signed volume)
tickSign = close > close ? 1.0 : close < close ? -1.0 : 0.0
delta = volume * tickSign
cumDelta = ta.cum(delta)
rollCD = cumDelta - cumDelta
//======================
// Signal conditions
//======================
volActive = rvol >= rvolMin
effortBuy = wrb and clo >= upperCloseQ
effortSell = wrb and clo <= lowerCloseQ
cdUp = ta.crossover(rollCD, 0)
cdDown = ta.crossunder(rollCD, 0)
biasBuy = not useVWAP or close > vwap
biasSell = not useVWAP or close < vwap
longOF = barstate.isconfirmed and volActive and effortBuy and cdUp and biasBuy
shortOF = barstate.isconfirmed and volActive and effortSell and cdDown and biasSell
//======================
// Plot ONLY on price chart
//======================
// SMAs & VWAP
plot(sma9, title="9 SMA", color=color.orange, linewidth=3)
plot(sma20, title="20 SMA", color=color.white, linewidth=3)
plot(sma200, title="200 SMA", color=color.black, linewidth=3)
plot(vwap, title="VWAP", color=color.new(color.aqua, 0), linewidth=3)
// Triangles with const text (no extra pane)
plotshape(showSignals and longOF, title="LONG OF",
style=shape.triangleup, location=location.belowbar, size=size.tiny,
color=color.new(color.green, 0), text="LONG OF")
plotshape(showSignals and shortOF, title="SHORT OF",
style=shape.triangledown, location=location.abovebar, size=size.tiny,
color=color.new(color.red, 0), text="SHORT OF")
// Alerts
alertcondition(longOF, title="LONG OF confirmed", message="LONG OF confirmed")
alertcondition(shortOF, title="SHORT OF confirmed", message="SHORT OF confirmed")
//────────────────────────────
// End-of-line labels (offset to the right)
//────────────────────────────
var label label9 = na
var label label20 = na
var label label200 = na
var label labelVW = na
if barstate.islast
// delete old labels before drawing new ones
label.delete(label9)
label.delete(label20)
label.delete(label200)
label.delete(labelVW)
// how far to move the labels rightward (increase if needed)
offsetBars = input.int(3)
label9 := label.new(bar_index + offsetBars, sma9, "9 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.orange, 0))
label20 := label.new(bar_index + offsetBars, sma20, "20 SMA", style=label.style_label_left, textcolor=color.black, color=color.new(color.white, 0))
label200 := label.new(bar_index + offsetBars, sma200, "200 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
labelVW := label.new(bar_index + offsetBars, vwap, "VWAP", style=label.style_label_left, textcolor=color.black, color=color.new(color.aqua, 0))
//────────────────────────────────────────────────────────────────────
//────────────────────────────────────────────
// Overnight High/Low + HOD/LOD (no POC)
//────────────────────────────────────────────
sessionRTH = input.session("0930-1600", "RTH Session (exchange tz)")
levelWidth = input.int(2, "HL line width", minval=1, maxval=5)
labelOffsetH = input.int(10, "HL label offset (bars to right)", minval=0)
isRTH = not na(time(timeframe.period, sessionRTH))
rthOpen = isRTH and not isRTH
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
var float onHigh = na
var float onLow = na
var int onHighBar = na
var int onLowBar = na
var float onHighFix = na
var float onLowFix = na
var int onHighFixBar = na
var int onLowFixBar = na
if not isRTH
if na(onHigh) or high > onHigh
onHigh := high
onHighBar := bar_index
if na(onLow) or low < onLow
onLow := low
onLowBar := bar_index
if rthOpen
onHighFix := onHigh
onLowFix := onLow
onHighFixBar := onHighBar
onLowFixBar := onLowBar
onHigh := na, onLow := na
onHighBar := na, onLowBar := na
// ──────────────────────────────────────────
// Candle coloring + labels for 9/20/VWAP crosses
// ──────────────────────────────────────────
showCrossLabels = input.bool(true, "Show cross labels")
// Helpers
minAll = math.min(math.min(sma9, sma20), vwap)
maxAll = math.max(math.max(sma9, sma20), vwap)
// All three lines
goldenAll = open <= minAll and close >= maxAll
deathAll = open >= maxAll and close <= minAll
// 9/20 only (exclude cases that also crossed VWAP)
dcUpOnly = open <= math.min(sma9, sma20) and close >= math.max(sma9, sma20) and not goldenAll
dcDownOnly = open >= math.max(sma9, sma20) and close <= math.min(sma9, sma20) and not deathAll
// Candle colors (priority: all three > 9/20 only)
var color cCol = na
cCol := goldenAll ? color.yellow : deathAll ? color.black :dcUpOnly ? color.lime :dcDownOnly ? color.red : na
barcolor(cCol)
// Labels
plotshape(showCrossLabels and barstate.isconfirmed and goldenAll, title="GOLDEN CROSS",
style=shape.labelup, location=location.belowbar, text="GOLDEN CROSS",
color=color.new(color.yellow, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and deathAll, title="DEATH CROSS",
style=shape.labeldown, location=location.abovebar, text="DEATH CROSS",
color=color.new(color.black, 0), textcolor=color.white, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcUpOnly, title="DC UP",
style=shape.labelup, location=location.belowbar, text="DC UP",
color=color.new(color.lime, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcDownOnly, title="DC DOWN",
style=shape.labeldown, location=location.abovebar, text="DC DOWN",
color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
// ──────────────────────────────────────────
// Audible + alert conditions
// ──────────────────────────────────────────
alertcondition(goldenAll, title="GOLDEN CROSS", message="GOLDEN CROSS detected")
alertcondition(deathAll, title="DEATH CROSS", message="DEATH CROSS detected")
alertcondition(dcUpOnly, title="DC UP", message="Dual Cross UP detected")
alertcondition(dcDownOnly,title="DC DOWN", message="Dual Cross DOWN detected")
PineConnectorLibrary "PineConnector"
This library is a comprehensive alert webhook text generator for PineConnector. It contains every possible alert syntax variation from the documentation, along with some debugging functions.
To use it, just import the library (eg. "import ZenAndTheArtOfTrading/PineConnector/1 as pc") and use pc.buy(licenseID) to send an alert off to PineConnector - assuming all your webhooks etc are set up correctly.
View the PineConnector documentation for more information on how to send the commands you're looking to send (all of this library's function names match the documentation).
all()
Usage: pc.buy(pc_id, freq=pc.all())
Returns: "all"
once_per_bar()
Usage: pc.buy(pc_id, freq=pc.once_per_bar())
Returns: "once_per_bar"
once_per_bar_close()
Usage: pc.buy(pc_id, freq=pc.once_per_bar_close())
Returns: "once_per_bar_close"
na0(value)
Checks if given value is either 'na' or 0. Useful for streamlining scripts with float user setting inputs which default values to 0 since na is unavailable as a user input default.
Parameters:
value (float) : The value to check
Returns: True if the given value is 0 or na
getDecimals()
Calculates how many decimals are on the quote price of the current market.
Returns: The current decimal places on the market quote price
truncate(number, decimals)
Truncates the given number. Required params: mumber.
Parameters:
number (float) : Number to truncate
decimals (int) : Decimal places to cut down to
Returns: The input number, but as a string truncated to X decimals
getPipSize(multiplier)
Calculates the pip size of the current market.
Parameters:
multiplier (int) : The mintick point multiplier (1 by default, 10 for FX/Crypto/CFD but can be used to override when certain markets require)
Returns: The pip size for the current market
toWhole(number)
Converts pips into whole numbers. Required params: number.
Parameters:
number (float) : The pip number to convert into a whole number
Returns: The converted number
toPips(number)
Converts whole numbers back into pips. Required params: number.
Parameters:
number (float) : The whole number to convert into pips
Returns: The converted number
debug(txt, tooltip, displayLabel)
Prints to console and generates a debug label with the given text. Required params: txt.
Parameters:
txt (string) : Text to display
tooltip (string) : Tooltip to display (optional)
displayLabel (bool) : Turns on/off chart label (default: off)
Returns: Nothing
order(licenseID, command, symbol, parameters, accfilter, comment, secret, freq, debug)
Generates an alert string. Required params: licenseID, command.
Parameters:
licenseID (string) : Your PC license ID
command (string) : Command to send
symbol (string) : The symbol to trigger this order on
parameters (string) : Other optional parameters to include
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: An alert string with valid PC syntax based on supplied parameters
market_order(licenseID, buy, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market entry alert with relevant syntax commands. Required params: licenseID, buy, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
buy(licenseID, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market buy alert with relevant syntax commands. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
sell(licenseID, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market sell alert with relevant syntax commands. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
closeall(licenseID, comment, secret, freq, debug)
Closes all open trades at market regardless of symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closealleaoff(licenseID, comment, secret, freq, debug)
Closes all open trades at market regardless of symbol, and turns the EA off. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelong(licenseID, symbol, comment, secret, freq, debug)
Closes all long trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshort(licenseID, symbol, comment, secret, freq, debug)
Closes all open short trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongshort(licenseID, symbol, comment, secret, freq, debug)
Closes all open trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongbuy(licenseID, risk, symbol, comment, secret, freq, debug)
Close all long positions and open a new long at market for the given symbol with given risk/contracts. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk or contracts (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortsell(licenseID, risk, symbol, comment, secret, freq, debug)
Close all short positions and open a new short at market for the given symbol with given risk/contracts. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk or contracts (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltplong(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any open long trades on the given symbol with the given values. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpshort(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any open short trades on the given symbol with the given values. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongpct(licenseID, symbol, comment, secret, freq, debug)
Close a percentage of open long positions (according to EA settings). Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortpct(licenseID, symbol, comment, secret, freq, debug)
Close a percentage of open short positions (according to EA settings). Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongvol(licenseID, risk, symbol, comment, secret, freq, debug)
Close all open long contracts on the current symbol until the given risk value is remaining. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : The quantity to leave remaining
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortvol(licenseID, risk, symbol, comment, secret, freq, debug)
Close all open short contracts on the current symbol until the given risk value is remaining. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : The quantity to leave remaining
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
limit_order(licenseID, buy, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a limit order alert with relevant syntax commands. Required params: licenseID, buy, price, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
buylimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a buylimit order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
selllimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a selllimit order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
stop_order(licenseID, buy, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a stop order alert with relevant syntax commands. Required params: licenseID, buy, price, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
buystop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a buystop order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
sellstop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a sellstop order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancel_neworder(licenseID, order, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancel + place new order template function.
Parameters:
licenseID (string) : Your PC license ID
order (string) : Cancel order type
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellongbuystop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all long orders with the specified symbol and places a new buystop order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellongbuylimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all long orders with the specified symbol and places a new buylimit order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancelshortsellstop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all short orders with the specified symbol and places a sellstop order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancelshortselllimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all short orders with the specified symbol and places a selllimit order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellong(licenseID, symbol, accfilter, comment, secret, freq, debug)
Cancels all pending long orders with the specified symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A cancel long alert command
cancelshort(licenseID, symbol, accfilter, comment, secret, freq, debug)
Cancels all pending short orders with the specified symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A cancel short alert command
newsltpbuystop(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending buy stop orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpbuylimit(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending buy limit orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpsellstop(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending sell stop orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpselllimit(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending sell limit orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
eaoff(licenseID, secret, freq, debug)
Turns the EA off. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
eaon(licenseID, secret, freq, debug)
Turns the EA on. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
Scout Regiment - KSI# Scout Regiment - KSI Indicator
## English Documentation
### Overview
Scout Regiment - KSI (Key Stochastic Indicators) is a comprehensive momentum oscillator that combines three powerful technical indicators - RSI, CCI, and Williams %R - into a single, unified display. This multi-indicator approach provides traders with diverse perspectives on market momentum, overbought/oversold conditions, and potential reversal points through advanced divergence detection.
### What is KSI?
KSI stands for "Key Stochastic Indicators" - a composite momentum indicator that:
- Displays multiple oscillators normalized to a 0-100 scale
- Uses standardized bands (20/50/80) for consistent interpretation
- Combines RSI for trend, CCI for cycle, and Williams %R for reversal detection
- Provides enhanced divergence detection specifically for RSI
### Key Features
#### 1. **Triple Oscillator System**
**① RSI (Relative Strength Index)** - Primary Indicator
- **Purpose**: Measures momentum and identifies overbought/oversold conditions
- **Default Length**: 22 periods
- **Display**: Blue line (2px)
- **Key Levels**:
- Above 50: Bullish momentum
- Below 50: Bearish momentum
- Above 80: Overbought
- Below 20: Oversold
- **Special Features**:
- Background color indication (green/red)
- Crossover labels at 50 level
- Full divergence detection (4 types)
**② CCI (Commodity Channel Index)** - Dual Period
- **Purpose**: Identifies cyclical trends and extreme conditions
- **Dual Display**:
- CCI(33): Short-term cycle - Green line (1px)
- CCI(77): Medium-term cycle - Orange line (1px)
- **Default Source**: HLC3 (typical price)
- **Normalized Scale**: Mapped from ±100 to 0-100 for consistency
- **Interpretation**:
- Above 80: Strong upward momentum
- Below 20: Strong downward momentum
- 50 level: Neutral
- Divergence between periods: Trend change warning
**③ Williams %R** - Optional
- **Purpose**: Identifies overbought/oversold extremes
- **Default Length**: 28 periods
- **Display**: Magenta line (2px)
- **Scale**: Inverted and normalized to 0-100
- **Best For**: Short-term reversal signals
- **Default**: Disabled (enable when needed for extra confirmation)
#### 2. **Standardized Band System**
**Three-Level Structure:**
- **Upper Band (80)**: Overbought zone
- Strong momentum area
- Watch for reversal signals
- Divergences here are most reliable
- **Middle Line (50)**: Equilibrium
- Separates bullish/bearish zones
- Crossovers indicate momentum shifts
- Key decision level
- **Lower Band (20)**: Oversold zone
- Weak momentum area
- Look for bounce signals
- Divergences here signal potential reversals
**Band Fill**: Dark background between 20-80 for visual clarity
#### 3. **RSI Visual Enhancements**
**Background Color Indication**
- Green background: RSI above 50 (bullish bias)
- Red background: RSI below 50 (bearish bias)
- Optional display for cleaner charts
- Helps identify overall momentum direction
**Crossover Labels**
- "突破" (Breakout): RSI crosses above 50
- "跌破" (Breakdown): RSI crosses below 50
- Marks momentum shift points
- Can be toggled on/off
#### 4. **Advanced RSI Divergence Detection**
The indicator includes comprehensive divergence detection for RSI only (most reliable oscillator):
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **RSI**: Higher lows
- **Signal**: Potential upward reversal
- **Label**: "涨" (Up)
- **Most Common**: Near oversold levels (below 30)
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **RSI**: Lower highs
- **Signal**: Potential downward reversal
- **Label**: "跌" (Down)
- **Most Common**: Near overbought levels (above 70)
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Higher lows
- **RSI**: Lower lows
- **Signal**: Uptrend continuation
- **Label**: "隐涨" (Hidden Up)
- **Use**: Add to existing longs
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Lower highs
- **RSI**: Higher highs
- **Signal**: Downtrend continuation
- **Label**: "隐跌" (Hidden Down)
- **Use**: Add to existing shorts
**Divergence Parameters** (Fully Customizable):
- **Right Lookback**: Bars to right of pivot (default: 5)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between pivots (default: 60)
- **Min Range**: Minimum bars between pivots (default: 5)
### Configuration Settings
#### KSI Display Settings
- **Show RSI**: Toggle RSI indicator
- **Show CCI**: Toggle both CCI lines
- **Show Williams %R**: Toggle Williams %R (optional)
#### RSI Settings
- **RSI Length**: Period for calculation (default: 22)
- **Data Source**: Price source (default: close)
- **Show Background**: Toggle green/red background
- **Show Cross Labels**: Toggle 50-level crossover labels
#### RSI Divergence Settings
- **Right Lookback**: Pivot detection right side
- **Left Lookback**: Pivot detection left side
- **Max Range**: Maximum lookback distance
- **Min Range**: Minimum lookback distance
- **Show Regular Divergence**: Enable regular divergence lines
- **Show Regular Labels**: Enable regular divergence labels
- **Show Hidden Divergence**: Enable hidden divergence lines
- **Show Hidden Labels**: Enable hidden divergence labels
#### CCI Settings
- **CCI Length**: Short-term period (default: 33)
- **CCI Mid Length**: Medium-term period (default: 77)
- **Data Source**: Price calculation (default: HLC3)
- **Show CCI(33)**: Toggle short-term CCI
- **Show CCI(77)**: Toggle medium-term CCI
#### Williams %R Settings
- **Length**: Calculation period (default: 28)
- **Data Source**: Price source (default: close)
### How to Use
#### For Basic Momentum Trading
1. **Enable RSI Only** (primary indicator)
- Focus on 50-level crossovers
- Enable crossover labels for signals
2. **Identify Momentum Direction**
- RSI > 50 = Bullish momentum
- RSI < 50 = Bearish momentum
- Background color confirms direction
3. **Look for Extremes**
- RSI > 80 = Overbought (consider selling)
- RSI < 20 = Oversold (consider buying)
4. **Trade Setup**
- Enter long when RSI crosses above 50 from oversold
- Enter short when RSI crosses below 50 from overbought
#### For Divergence Trading
1. **Enable RSI with Divergence Detection**
- Turn on regular divergence
- Optionally add hidden divergence
2. **Wait for Divergence Signal**
- Yellow label = Bullish divergence
- Blue label = Bearish divergence
3. **Confirm with Price Structure**
- Wait for support/resistance break
- Look for candlestick patterns
- Check volume confirmation
4. **Enter Position**
- Enter after confirmation
- Stop beyond divergence pivot
- Target next key level
#### For Multi-Oscillator Confirmation
1. **Enable All Three Indicators**
- RSI (momentum)
- CCI dual (cycle analysis)
- Williams %R (extremes)
2. **Look for Alignment**
- All above 50 = Strong bullish
- All below 50 = Strong bearish
- Mixed signals = Consolidation
3. **Identify Extremes**
- All indicators > 80 = Extreme overbought
- All indicators < 20 = Extreme oversold
4. **Trade Reversals**
- Enter counter-trend when all aligned at extremes
- Confirm with divergence if available
- Use tight stops
#### For CCI Dual-Period Analysis
1. **Enable Both CCI Lines**
- CCI(33) = Short-term
- CCI(77) = Medium-term
2. **Watch for Crossovers**
- Green crosses above orange = Bullish acceleration
- Green crosses below orange = Bearish acceleration
3. **Analyze Divergence Between Periods**
- Short-term rising, medium falling = Potential reversal
- Both rising together = Strong trend
4. **Trade Accordingly**
- Follow crossover direction
- Exit when lines converge
### Trading Strategies
#### Strategy 1: RSI 50-Level Crossover
**Setup:**
- Enable RSI with background and labels
- Wait for clear trend
- Look for retracement to 50 level
**Entry:**
- Long: "突破" label appears after pullback
- Short: "跌破" label appears after bounce
**Stop Loss:**
- Long: Below recent swing low
- Short: Above recent swing high
**Exit:**
- Opposite crossover label
- Or predetermined target (2:1 risk-reward)
**Best For:** Trend following, clear markets
#### Strategy 2: RSI Divergence Reversal
**Setup:**
- Enable RSI with regular divergence
- Wait for extreme levels (>70 or <30)
- Look for divergence signal
**Entry:**
- Long: Yellow "涨" label at oversold level
- Short: Blue "跌" label at overbought level
**Confirmation:**
- Wait for price to break structure
- Check for volume increase
- Look for candlestick reversal pattern
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- Take partial profit at 50 level
- Exit remainder at opposite extreme or divergence
**Best For:** Swing trading, range-bound markets
#### Strategy 3: Triple Oscillator Confluence
**Setup:**
- Enable all three indicators
- Wait for all to reach extreme (>80 or <20)
- Look for alignment
**Entry:**
- Long: All three below 20, first one crosses above 20
- Short: All three above 80, first one crosses below 80
**Confirmation:**
- All indicators must align
- Price at support/resistance
- Volume spike helps
**Stop Loss:**
- Fixed percentage or ATR-based
**Exit:**
- When any indicator crosses 50 level
- Or at predetermined target
**Best For:** High-probability reversals, volatile markets
#### Strategy 4: CCI Dual-Period System
**Setup:**
- Enable both CCI lines only
- Disable RSI and Williams %R for clarity
- Watch for crossovers
**Entry:**
- Long: CCI(33) crosses above CCI(77) below 50 line
- Short: CCI(33) crosses below CCI(77) above 50 line
**Confirmation:**
- Both should be moving in entry direction
- Price breaking key level helps
**Stop Loss:**
- When CCIs cross back in opposite direction
**Exit:**
- Both CCIs enter opposite extreme zone
- Or trailing stop
**Best For:** Catching trend continuations, momentum trading
#### Strategy 5: Hidden Divergence Continuation
**Setup:**
- Enable RSI with hidden divergence
- Confirm existing trend
- Wait for pullback
**Entry:**
- Uptrend: "隐涨" label during pullback
- Downtrend: "隐跌" label during bounce
**Confirmation:**
- Price holds key moving average
- Trend structure intact
**Stop Loss:**
- Beyond pullback extreme
**Exit:**
- Regular divergence appears (reversal warning)
- Or trend structure breaks
**Best For:** Adding to positions, trend trading
### Best Practices
#### Choosing Which Indicators to Display
**For Beginners:**
- Use RSI only
- Enable background color and labels
- Focus on 50-level crossovers
- Simple and effective
**For Intermediate Traders:**
- RSI + Regular Divergence
- Add CCI for confirmation
- Use dual perspectives
- Better accuracy
**For Advanced Traders:**
- All three indicators
- Full divergence detection
- Multi-timeframe analysis
- Maximum information
#### Oscillator Priority
**Primary**: RSI (22)
- Most reliable
- Best divergence detection
- Good for all timeframes
- Use this as your main decision maker
**Secondary**: CCI (33/77)
- Adds cycle analysis
- Great for confirmation
- Dual-period crossovers valuable
- Use to confirm RSI signals
**Tertiary**: Williams %R (28)
- Extreme readings useful
- More volatile
- Best for short-term
- Use sparingly for extra confirmation
#### Timeframe Considerations
**Lower Timeframes (1m-15m):**
- More signals, less reliable
- Use tight divergence parameters
- Focus on RSI crossovers
- Quick entries and exits
**Medium Timeframes (30m-4H):**
- Balanced signal frequency
- Default settings work well
- Best for divergence trading
- Swing trading optimal
**Higher Timeframes (Daily+):**
- Fewer but stronger signals
- Widen divergence ranges
- All indicators more reliable
- Position trading best
#### Divergence Trading Tips
1. **Wait for Confirmation**
- Divergence alone isn't enough
- Need price structure break
- Volume helps validate
2. **Best at Extremes**
- Divergences near 80/20 levels most reliable
- Mid-level divergences often fail
- Combine with support/resistance
3. **Multiple Divergences**
- Second divergence stronger than first
- Third divergence extremely powerful
- Watch for "triple divergence"
4. **Timeframe Alignment**
- Check higher timeframe for direction
- Trade divergences in direction of larger trend
- Counter-trend divergences riskier
### Indicator Combinations
**With Moving Averages:**
- Use EMAs (21/55/144) for trend
- KSI for entry timing
- Enter when both align
**With Volume:**
- Volume confirms breakouts
- Divergence + volume divergence = Stronger
- Low volume at extremes = Reversal likely
**With Support/Resistance:**
- Price levels for targets
- KSI for entry timing
- Divergences at levels = Highest probability
**With Bias Indicator:**
- Bias shows price deviation
- KSI shows momentum
- Both diverging = Strong reversal signal
**With OBV Indicator:**
- OBV shows volume trend
- KSI shows price momentum
- Volume/momentum divergence powerful
### Common Patterns
1. **Bullish Reversal**: All oscillators oversold + RSI bullish divergence
2. **Bearish Reversal**: All oscillators overbought + RSI bearish divergence
3. **Trend Acceleration**: RSI > 50, both CCIs rising, Williams %R not extreme
4. **Weakening Trend**: RSI declining while price rising (pre-divergence warning)
5. **Strong Trend**: All oscillators stay above/below 50 for extended period
6. **Consolidation**: Oscillators crossing 50 frequently without extremes
7. **Exhaustion**: Multiple oscillators at extreme + hidden divergence failure
### Performance Tips
- Start simple: RSI only
- Add indicators gradually as you learn
- Disable unused features for cleaner charts
- Use labels strategically (not always on)
- Test different RSI lengths for your market
- Adjust divergence parameters based on volatility
### Alert Conditions
The indicator includes alerts for:
- RSI crossing above 50
- RSI crossing below 50
- RSI regular bullish divergence
- RSI regular bearish divergence
- RSI hidden bullish divergence
- RSI hidden bearish divergence
---
## 中文说明文档
### 概述
Scout Regiment - KSI(关键随机指标)是一个综合性动量振荡器,将三个强大的技术指标 - RSI、CCI和威廉指标 - 组合到一个统一的显示中。这种多指标方法为交易者提供了市场动量、超买超卖状况和通过高级背离检测发现潜在反转点的多元视角。
### 什么是KSI?
KSI代表"关键随机指标" - 一个综合动量指标:
- 显示多个振荡器,标准化到0-100刻度
- 使用标准化波段(20/50/80)便于一致解读
- 结合RSI用于趋势、CCI用于周期、威廉指标用于反转检测
- 专门为RSI提供增强的背离检测
### 核心功能
#### 1. **三重振荡器系统**
**① RSI(相对强弱指数)** - 主要指标
- **用途**:测量动量并识别超买超卖状况
- **默认长度**:22周期
- **显示**:蓝色线(2像素)
- **关键水平**:
- 50以上:看涨动量
- 50以下:看跌动量
- 80以上:超买
- 20以下:超卖
- **特殊功能**:
- 背景颜色指示(绿色/红色)
- 50水平穿越标签
- 完整背离检测(4种类型)
**② CCI(顺势指标)** - 双周期
- **用途**:识别周期性趋势和极端状况
- **双重显示**:
- CCI(33):短期周期 - 绿色线(1像素)
- CCI(77):中期周期 - 橙色线(1像素)
- **默认数据源**:HLC3(典型价格)
- **标准化刻度**:从±100映射到0-100以保持一致性
- **解读**:
- 80以上:强劲上升动量
- 20以下:强劲下降动量
- 50水平:中性
- 周期间背离:趋势变化警告
**③ 威廉指标 %R** - 可选
- **用途**:识别超买超卖极值
- **默认长度**:28周期
- **显示**:洋红色线(2像素)
- **刻度**:反转并标准化到0-100
- **最适合**:短期反转信号
- **默认**:禁用(需要额外确认时启用)
#### 2. **标准化波段系统**
**三层结构:**
- **上轨(80)**:超买区域
- 强动量区域
- 注意反转信号
- 此处的背离最可靠
- **中线(50)**:均衡线
- 分隔看涨/看跌区域
- 穿越表示动量转变
- 关键决策水平
- **下轨(20)**:超卖区域
- 弱动量区域
- 寻找反弹信号
- 此处的背离预示潜在反转
**波段填充**:20-80之间的深色背景,增强视觉清晰度
#### 3. **RSI视觉增强**
**背景颜色指示**
- 绿色背景:RSI在50以上(看涨偏向)
- 红色背景:RSI在50以下(看跌偏向)
- 可选显示,图表更清爽
- 帮助识别整体动量方向
**穿越标签**
- "突破":RSI向上穿越50
- "跌破":RSI向下穿越50
- 标记动量转变点
- 可开关
#### 4. **高级RSI背离检测**
指标仅为RSI(最可靠的振荡器)提供全面背离检测:
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **RSI**:更高的低点
- **信号**:潜在向上反转
- **标签**:"涨"
- **最常见**:在超卖水平附近(30以下)
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **RSI**:更低的高点
- **信号**:潜在向下反转
- **标签**:"跌"
- **最常见**:在超买水平附近(70以上)
**隐藏看涨背离(浅黄色)**
- **价格**:更高的低点
- **RSI**:更低的低点
- **信号**:上升趋势延续
- **标签**:"隐涨"
- **用途**:加仓现有多头
**隐藏看跌背离(浅蓝色)**
- **价格**:更低的高点
- **RSI**:更高的高点
- **信号**:下降趋势延续
- **标签**:"隐跌"
- **用途**:加仓现有空头
**背离参数**(完全可自定义):
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
### 配置设置
#### KSI显示设置
- **显示RSI**:切换RSI指标
- **显示CCI**:切换两条CCI线
- **显示威廉指标 %R**:切换威廉指标(可选)
#### RSI设置
- **RSI长度**:计算周期(默认:22)
- **数据源**:价格源(默认:收盘价)
- **显示背景**:切换绿色/红色背景
- **显示穿越标签**:切换50水平穿越标签
#### RSI背离设置
- **右侧回溯**:枢轴检测右侧
- **左侧回溯**:枢轴检测左侧
- **回溯范围最大值**:最大回溯距离
- **回溯范围最小值**:最小回溯距离
- **显示常规背离**:启用常规背离线
- **显示常规背离标签**:启用常规背离标签
- **显示隐藏背离**:启用隐藏背离线
- **显示隐藏背离标签**:启用隐藏背离标签
#### CCI设置
- **CCI长度**:短期周期(默认:33)
- **CCI中期长度**:中期周期(默认:77)
- **数据源**:价格计算(默认:HLC3)
- **显示CCI(33)**:切换短期CCI
- **显示CCI(77)**:切换中期CCI
#### 威廉指标 %R 设置
- **长度**:计算周期(默认:28)
- **数据源**:价格源(默认:收盘价)
### 使用方法
#### 基础动量交易
1. **仅启用RSI**(主要指标)
- 关注50水平穿越
- 启用穿越标签获取信号
2. **识别动量方向**
- RSI > 50 = 看涨动量
- RSI < 50 = 看跌动量
- 背景颜色确认方向
3. **寻找极值**
- RSI > 80 = 超买(考虑卖出)
- RSI < 20 = 超卖(考虑买入)
4. **交易设置**
- RSI从超卖区向上穿越50时做多
- RSI从超买区向下穿越50时做空
#### 背离交易
1. **启用RSI和背离检测**
- 打开常规背离
- 可选添加隐藏背离
2. **等待背离信号**
- 黄色标签 = 看涨背离
- 蓝色标签 = 看跌背离
3. **用价格结构确认**
- 等待支撑/阻力突破
- 寻找K线形态
- 检查成交量确认
4. **进入仓位**
- 确认后进入
- 止损设在背离枢轴点之外
- 目标下一个关键水平
#### 多振荡器确认
1. **启用全部三个指标**
- RSI(动量)
- CCI双周期(周期分析)
- 威廉指标 %R(极值)
2. **寻找一致性**
- 全部在50以上 = 强劲看涨
- 全部在50以下 = 强劲看跌
- 信号混合 = 盘整
3. **识别极值**
- 所有指标 > 80 = 极度超买
- 所有指标 < 20 = 极度超卖
4. **交易反转**
- 所有指标在极值一致时逆势进入
- 可能的话用背离确认
- 使用紧密止损
#### CCI双周期分析
1. **启用两条CCI线**
- CCI(33) = 短期
- CCI(77) = 中期
2. **观察穿越**
- 绿色线穿越橙色线向上 = 看涨加速
- 绿色线穿越橙色线向下 = 看跌加速
3. **分析周期间背离**
- 短期上升,中期下降 = 潜在反转
- 两者同时上升 = 强趋势
4. **相应交易**
- 跟随穿越方向
- 线条汇合时退出
### 交易策略
#### 策略1:RSI 50水平穿越
**设置:**
- 启用RSI及背景和标签
- 等待明确趋势
- 寻找回调至50水平
**入场:**
- 多头:回调后出现"突破"标签
- 空头:反弹后出现"跌破"标签
**止损:**
- 多头:近期波动低点之下
- 空头:近期波动高点之上
**离场:**
- 出现相反穿越标签
- 或预定目标(2:1风险收益比)
**适合:**趋势跟随、明确市场
#### 策略2:RSI背离反转
**设置:**
- 启用RSI和常规背离
- 等待极端水平(>70或<30)
- 寻找背离信号
**入场:**
- 多头:超卖水平出现黄色"涨"标签
- 空头:超买水平出现蓝色"跌"标签
**确认:**
- 等待价格突破结构
- 检查成交量增加
- 寻找K线反转形态
**止损:**
- 背离枢轴点之外
**离场:**
- 在50水平部分获利
- 其余在相反极值或背离处离场
**适合:**波段交易、震荡市场
#### 策略3:三重振荡器汇合
**设置:**
- 启用全部三个指标
- 等待全部达到极值(>80或<20)
- 寻找一致性
**入场:**
- 多头:三个全部低于20,第一个向上穿越20
- 空头:三个全部高于80,第一个向下穿越80
**确认:**
- 所有指标必须一致
- 价格在支撑/阻力位
- 成交量激增有帮助
**止损:**
- 固定百分比或基于ATR
**离场:**
- 任一指标穿越50水平时
- 或在预定目标
**适合:**高概率反转、波动市场
#### 策略4:CCI双周期系统
**设置:**
- 仅启用两条CCI线
- 禁用RSI和威廉指标以保持清晰
- 观察穿越
**入场:**
- 多头:CCI(33)在50线下方向上穿越CCI(77)
- 空头:CCI(33)在50线上方向下穿越CCI(77)
**确认:**
- 两者都应朝入场方向移动
- 价格突破关键水平有帮助
**止损:**
- CCI反向穿越时
**离场:**
- 两条CCI进入相反极值区域
- 或移动止损
**适合:**捕捉趋势延续、动量交易
#### 策略5:隐藏背离延续
**设置:**
- 启用RSI和隐藏背离
- 确认现有趋势
- 等待回调
**入场:**
- 上升趋势:回调期间出现"隐涨"标签
- 下降趋势:反弹期间出现"隐跌"标签
**确认:**
- 价格守住关键移动平均线
- 趋势结构完整
**止损:**
- 回调极值之外
**离场:**
- 出现常规背离(反转警告)
- 或趋势结构破坏
**适合:**加仓、趋势交易
### 最佳实践
#### 选择显示哪些指标
**新手:**
- 仅使用RSI
- 启用背景颜色和标签
- 关注50水平穿越
- 简单有效
**中级交易者:**
- RSI + 常规背离
- 添加CCI确认
- 使用双重视角
- 更高准确度
**高级交易者:**
- 全部三个指标
- 完整背离检测
- 多时间框架分析
- 信息最大化
#### 振荡器优先级
**主要**:RSI (22)
- 最可靠
- 最佳背离检测
- 适用所有时间框架
- 用作主要决策依据
**次要**:CCI (33/77)
- 添加周期分析
- 确认效果好
- 双周期穿越有价值
- 用于确认RSI信号
**第三**:威廉指标 %R (28)
- 极值读数有用
- 更波动
- 最适合短期
- 谨慎使用以获额外确认
#### 时间框架考虑
**低时间框架(1分钟-15分钟):**
- 更多信号,可靠性较低
- 使用紧密背离参数
- 关注RSI穿越
- 快速进出
**中等时间框架(30分钟-4小时):**
- 信号频率平衡
- 默认设置效果好
- 最适合背离交易
- 波段交易最优
**高时间框架(日线+):**
- 信号较少但更强
- 扩大背离范围
- 所有指标更可靠
- 最适合仓位交易
#### 背离交易技巧
1. **等待确认**
- 仅背离不够
- 需要价格结构突破
- 成交量帮助验证
2. **极值处最佳**
- 80/20水平附近的背离最可靠
- 中间水平背离常失败
- 结合支撑/阻力
3. **多重背离**
- 第二次背离强于第一次
- 第三次背离极其强大
- 注意"三重背离"
4. **时间框架对齐**
- 检查更高时间框架方向
- 顺大趋势方向交易背离
- 逆势背离风险更大
### 指标组合
**与移动平均线配合:**
- 使用EMA(21/55/144)确定趋势
- KSI用于入场时机
- 两者一致时进入
**与成交量配合:**
- 成交量确认突破
- 背离 + 成交量背离 = 更强
- 极值处低成交量 = 可能反转
**与支撑/阻力配合:**
- 价格水平作为目标
- KSI用于入场时机
- 水平处的背离 = 最高概率
**与Bias指标配合:**
- Bias显示价格偏离
- KSI显示动量
- 两者都背离 = 强反转信号
**与OBV指标配合:**
- OBV显示成交量趋势
- KSI显示价格动量
- 成交量/动量背离强大
### 常见形态
1. **看涨反转**:所有振荡器超卖 + RSI看涨背离
2. **看跌反转**:所有振荡器超买 + RSI看跌背离
3. **趋势加速**:RSI > 50,两条CCI上升,威廉指标不极端
4. **趋势减弱**:价格上升时RSI下降(背离前警告)
5. **强趋势**:所有振荡器长时间保持在50上方/下方
6. **盘整**:振荡器频繁穿越50无极值
7. **衰竭**:多个振荡器在极值 + 隐藏背离失败
### 性能提示
- 从简单开始:仅RSI
- 学习时逐渐添加指标
- 禁用未使用功能以保持图表清晰
- 策略性使用标签(不总是开启)
- 为您的市场测试不同RSI长度
- 根据波动性调整背离参数
### 警报条件
指标包含以下警报:
- RSI向上穿越50
- RSI向下穿越50
- RSI常规看涨背离
- RSI常规看跌背离
- RSI隐藏看涨背离
- RSI隐藏看跌背离
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
EMA Dynamic Crossover Detector with Real-Time Signal TableDescriptionWhat This Indicator Does:This indicator monitors all possible crossovers between four key exponential moving averages (20, 50, 100, and 200 periods) and displays them both visually on the chart and in an organized data table. Unlike standard EMA indicators that only plot the lines, this tool actively detects every crossover event, marks the exact crossover point with a circle, records the precise price level, and maintains a running log of all crossovers during the trading session. It's designed for traders who want comprehensive EMA crossover analysis without manually watching multiple moving average pairs.Key Features:
Four Essential EMAs: Plots 20, 50, 100, and 200-period exponential moving averages with color-coded thin lines for clean chart presentation
Complete Crossover Detection: Monitors all 6 possible EMA pair combinations (20×50, 20×100, 20×200, 50×100, 50×200, 100×200) in both directions
Precise Price Marking: Places colored circles at the exact average price where crossovers occur (not just at candle close)
Real-Time Signal Table: Displays up to 10 most recent crossovers with timestamp, direction, exact price, and signal type
Session Filtering: Only records crossovers during active trading hours (10:00-18:00 Istanbul time) to avoid noise from low-liquidity periods
Automatic Daily Reset: Clears the signal table at the start of each new trading day for fresh analysis
Built-In Alerts: Two alert conditions (bullish and bearish crossovers) that can be configured to send notifications
How It Works:The indicator calculates four exponential moving averages using the standard EMA formula, then continuously monitors for crossover events using Pine Script's ta.crossover() and ta.crossunder() functions:Bullish Crossovers (Green ▲):
When a faster EMA crosses above a slower EMA, indicating potential upward momentum:
20 crosses above 50, 100, or 200
50 crosses above 100 or 200
100 crosses above 200 (Golden Cross when it's the 50×200)
Bearish Crossovers (Red ▼):
When a faster EMA crosses below a slower EMA, indicating potential downward momentum:
20 crosses below 50, 100, or 200
50 crosses below 100 or 200
100 crosses below 200 (Death Cross when it's the 50×200)
Price Calculation:
Instead of marking crossovers at the candle's close price (which might not be where the actual cross occurred), the indicator calculates the average price between the two crossing EMAs, providing a more accurate representation of the crossover point.Signal Table Structure:The table in the top-right corner displays four columns:
Saat (Time): Exact time of crossover in HH:MM format
Yön (Direction): Arrow indicator (▲ green for bullish, ▼ red for bearish)
Fiyat (Price): Calculated average price at the crossover point
Durum (Status): Signal classification ("ALIŞ" for buy signals, "SATIŞ" for sell signals) with color-coded background
The table shows up to 10 most recent crossovers, automatically updating as new signals appear. If no crossovers have occurred during the session within the time filter, it displays "Henüz kesişim yok" (No crossovers yet).EMA Color Coding:
EMA 20 (Aqua/Turquoise): Fastest-reacting, most sensitive to recent price changes
EMA 50 (Green): Short-term trend indicator
EMA 100 (Yellow): Medium-term trend indicator
EMA 200 (Red): Long-term trend baseline, key support/resistance level
How to Use:For Day Traders:
Monitor 20×50 crossovers for quick entry/exit signals within the day
Use the time filter (10:00-18:00) to focus on high-volume trading hours
Check the signal table throughout the session to track momentum shifts
Look for confirmation: if 20 crosses above 50 and price is above EMA 200, bullish bias is stronger
For Swing Traders:
Focus on 50×200 crossovers (Golden Cross/Death Cross) for major trend changes
Use higher timeframes (4H, Daily) for more reliable signals
Wait for price to close above/below the crossover point before entering
Combine with support/resistance levels for better entry timing
For Position Traders:
Monitor 100×200 crossovers on daily/weekly charts for long-term trend changes
Use as confirmation of major market shifts
Don't react to every crossover—wait for sustained movement after the cross
Consider multiple timeframe analysis (if crossovers align on weekly and daily, signal is stronger)
Understanding EMA Hierarchies:The indicator becomes most powerful when you understand EMA relationships:Bullish Hierarchy (Strongest to Weakest):
All EMAs ascending (20 > 50 > 100 > 200): Strong uptrend
20 crosses above 50 while both are above 200: Pullback ending in uptrend
50 crosses above 200 while 20/50 below: Early trend reversal signal
Bearish Hierarchy (Strongest to Weakest):
All EMAs descending (20 < 50 < 100 < 200): Strong downtrend
20 crosses below 50 while both are below 200: Rally ending in downtrend
50 crosses below 200 while 20/50 above: Early trend reversal signal
Trading Strategy Examples:Pullback Entry Strategy:
Identify major trend using EMA 200 (price above = uptrend, below = downtrend)
Wait for pullback (20 crosses below 50 in uptrend, or above 50 in downtrend)
Enter when 20 re-crosses 50 in the trend direction
Place stop below/above the recent swing point
Exit when 20 crosses 50 against the trend again
Golden Cross/Death Cross Strategy:
Wait for 50×200 crossover (appears in the signal table)
Verify: Check if crossover occurs with increasing volume
Entry: Enter in the direction of the cross after a pullback
Stop: Place stop below/above the 200 EMA
Target: Swing high/low or when opposite crossover occurs
Multi-Crossover Confirmation:
Watch for multiple crossovers in the same direction within a short period
Example: 20×50 crossover followed by 20×100 = strengthening momentum
Enter after the second confirmation crossover
More crossovers = stronger signal but also means you're entering later
Time Filter Benefits:The 10:00-18:00 Istanbul time filter prevents recording crossovers during:
Pre-market volatility and gaps
Low-volume overnight sessions (for 24-hour markets)
After-hours erratic movements
Turtle Trader StrategyTurtle Trader Strategy :
Introduction :
This strategy is based on the well known « Turtle Trader Strategy », that has proven itself over the years. It sends long and short signals with pyramid orders of up to 5, meaning that the strategy can trigger up to 5 orders in the same direction. Good risk and money management.
It's important to note that the strategy combines 2 systems working together (S1 and S2). Let’s describe the specific features of this strategy.
1/ Position size :
Position size is very important for turtle traders to manage risk properly. This position sizing strategy adapts to market volatility and to account (gains and losses). It’s based on ATR (Average True Range) which can also be called « N ». Its length is per default 20.
ATR(20) = (previous_atr(20)*19 + actual_true_range)/20
The number of units to buy is :
Unit = 1% * account/(ATR(20)*dollar_per_point)
where account is the actual account value and dollar_per_point is the variation in dollar of the asset with a 1 point move.
Depending on your risk aversion, you can increase the percentage of your account, but turtle traders default to 1%. If you trade contracts, units must be rounded down by default.
There is also an additional rule to reduce the risk if the value of the account falls below the initial capital : in this case and only in this case, account in the unit formula must be replace by :
account = actual_account*actual_account/initial capital
2/ Open a position :
2 systems are working together :
System 1 : Entering a new 20 day breakout
System 2 : Entering a new 55 day breakout
A breakout is a new high or new low. If it’s a new high, we open long position and vice versa if it’s a new low we enter in short position.
We add an additional rule :
System 1 : Breakout is ignored if last long/short position was a winner
System 2 : All signals are taken
This additional rule allows the trader to be in the major trends if the system 1 signal has been skipped. If a signal for system 1 has been skipped, and next candle is also a new 20 day breakout, S1 doesn’t give a signal. We have to wait S2 signal or wait for a candle that doesn’t make a new breakout to reactivate S1.
3/ Pyramid orders :
Turtle Strategy allows us to add extra units to the position if the price moves in our favor. I've configured the strategy to allow up to 5 orders to be added in the same direction. So if the price varies from 0.5*ATR(20) , we add units with the position size formula. Note that the value of account will be replaced by "remaining_account", i.e. the cash remaining in our account after subtracting the value of open positions.
4/ Stop Loss :
We set a stop loss at 1.5*ATR(20) below the entry price for longs and above the entry price for shorts. If pyramid units are added, the stop is increased/decreased by 0.5*ATR(20). Note that if SL is configured for a loss of more than 10%, we set the SL to 10% for the first entry order to avoid big losses. This configuration does not work for pyramid orders as SL moves by 0.5*ATR(20).
5/ Exit signals :
System 1 :
Exit long on a 10 day low
Exit short on a 10 day high
System 2 :
Exit long on a 20 day low
Exit short on a 20 day high
6/ What types of orders are placed ?
To enter in a position, stop orders are placed meaning that we place orders that will be automatically triggered by the signal at the exact breakout price. Stop loss and exit signals are also stop orders. Pyramid orders are market orders which will be triggered at the opening of the next candle to avoid repainting.
PARAMETERS :
Risk % of capital : Percentage used in the position size formula. Default is 1%
ATR period : ATR length used to calculate ATR. Default is 20
Stop ATR : Parameters used to fix stop loss. Default is 1.5 meaning that stop loss will be set at : buy_price - 1.5*ATR(20) for long and buy_price + 1.5*ATR(20) for short. Turtle traders default is 2 but 1.5 is better for cryptocurrency as there is a huge volatility.
S1 Long : System 1 breakout length for long. Default is 20
S2 Long : System 2 breakout length for long. Default is 55
S1 Long Exit : System 1 breakout length to exit long. Default is 10
S2 Long Exit : System 2 breakout length to exit long. Default is 20
S1 Short : System 1 breakout length for short. Default is 15
S2 Short : System 2 breakout length for short. Default is 55
S1 Short Exit : System 1 breakout length to exit short. Default is 7
S2 Short Exit : System 2 breakout length to exit short. Default is 20
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Pyramiding : Number of orders that can be passed in the same direction. Default is 5.
Important : Turtle traders don't trade crypto. For this specific asset type, I modify some parameters such as SL and Short S1 in order to maximize return while limiting drawdown. This strategy is the most optimal on BINANCE:BTCUSD in 1D timeframe with the parameters set per default. If you want to use this strategy for a different crypto please adapt parameters.
NOTE :
It's important to note that the first entry order (long or short) will be the largest. Subsequent pyramid orders will have fewer units than the first order. We've set a maximum SL for the first order of 10%, meaning that you won't lose more than 10% of the value of your first order. However, it is possible to lose more on your pyramid orders, as the SL is increased/decreased by 0.5*ATR(20), which does not secure a loss of more than 10% on your pyramid orders. The risk remains well managed because the value of these orders is less than the value of the first order. Remain vigilant to this small detail and adjust your risk according to your risk aversion.
Enjoy the strategy and don’t forget to take the trade :)
Rollover LTEThis indicator shows where price needs to be and when in order to cause the 20-sma and 50-sma moving averages to change directions. A change in direction requires the slope of a moving average to change from negative to positive or from positive to negative. When a moving average changes direction, it can be said that it has “rolled over” or “rolled up,” with the latter only applying if slope went from negative to positive.
Theory:
In order to solve for the price of the current bar that will cause the moving average to roll up, the slope from the previous bar’s average to the current bar’s average must be set equal to zero which is to say that the averages must be the same.
For the 20-sma, the equation simply stated in words is as follows:
Current MA as a function of current price and previous 19 values = previous MA which is fixed based on previous 20 values
The denominators which are both 20 cancel and the previous 19 values cancel. What’s left is current price on the left side and the value from 20 bars ago on the right.
Current price = value from 20 bars ago
and since the equation was set up for solving for the price of the current bar that will cause the MA to roll over
Rollover price = value from 20 bars ago
This makes plotting rollover price, both current and forecasted, fairly simple, as it’s merely the closing price plotted with an offset to the right the same distance as the moving average length.
Application:
The 20-sma and 50-sma rollover prices are plotted because they are considered to be the two most important moving averages for rollover analysis. Moving average lengths can be modified in the indicator settings. The 20-sma and 20-sma rollover price are both plotted in white and the 50-sma and 50-sma rollover price are both plotted in blue. There are two rollover prices because the 20-sma rollover price is the price that will cause the 20-sma to roll over and the 50-sma rollover price is the price that will cause the 50-sma to roll over. The one that's vertically furthest away from the current price is the one that will cause both to rollover, as should become clearer upon reading the explanation below.
The distance between the current price and the 20-sma rollover price is referred to as the “rollover strength” of the price relative to the 20-sma. A large disparity between the current price and the rollover price suggests bearishness (negative rollover strength) if the rollover price is overhead because price would need to travel all that distance in order to cause the moving average to roll up. If the rollover price and price are converging, as is often the case, a change in moving average and price direction becomes more plausible. The rollover strengths of the 20-sma and 50-sma are added together to calculate the Rollover Strength and if a negative number is the result then the background color of the plot cloud turns red. If the result is positive, it turns green. Rollover Strength is plotted below price as a separate indicator in this publication for reference only and it's not part of this indicator. It does not look much different from momentum indicators. The code is below if anybody wants to try to use it. The important thing is that the distances between the rollover prices and the price action are kept in mind as having shrinking, growing, or neutral bearish and bullish effects on current and forecasted price direction. Trades should not be entered based on cloud colorization changes alone.
If you are about to crash into a wall of the 20-sma rollover price, as is indicated on the chart by the green arrow, you might consider going long so long as the rollover strength, both current and forecasted, of the 50-sma isn’t questionably bearish. This is subject to analysis and interpretation. There was a 20-sma rollover wall as indicated with yellow arrow, but the bearish rollover strength of the 50-sma was growing and forecasted to remain strong for a while at that time so a long entry would have not been suggested by both rollover prices. If you are about to crash into both the 20-sma and 50-sma rollover prices at the same time (not shown on this chart), that’s a good time to place a trade in anticipation of both slopes changing direction. You may, in the case of this chart, see that a 20-sma rollover wall precedes a 50-sma rollover convergence with price and anticipate a cascade which turned out to be the case with this recent NQ rally.
Price exiting the cloud entirely to either the upside or downside has strong implications. When exiting to the downside, the 20-sma and 50-sma have both rolled over and price is below both of them. The same is true for upside exits. Re-entering the cloud after a rally may indicate a reversal is near, especially if the forecasted rollover prices, particularly the 50-sma, agree.
This indicator should be used in conjunction with other technical analysis tools.
Additional Notes:
The original version of this script which will not be published was much heavier, cluttered, and is not as useful. This is the light version, hence the “LTE” suffix.
LTE stands for “long-term evolution” in telecommunications, not “light.”
Bar colorization (red, yellow, and green bars) was added using the MACD Hybrid BSH script which is another script I’ve published.
If you’re not sure what a bar is, it’s the same thing as a candle or a data point on a line chart. Every vertical line showing price action on the chart above is a bar and it is a bar chart.
sma = simple moving average
Rollover Strength Script:
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Skipper86
//@version=5
indicator(title="Rollover Strength", shorttitle="Rollover Strength", overlay=false)
source = input.source(close)
length1 = input.int(20, "Length 1", minval=1)
length2 = input.int(50, "Length 2", minval=1)
RolloverPrice1 = source
RolloverPrice2 = source
RolloverStrength1 = source-RolloverPrice1
RolloverStrength2 = source-RolloverPrice2
RolloverStrength = RolloverStrength1 + RolloverStrength2
Color1 = color.rgb(155, 155, 155, 0)
Color2 = color.rgb(0, 0, 200, 0)
Color3 = color.rgb(0, 200, 0, 0)
plot(RolloverStrength, title="Rollover Strength", color=Color3)
hline(0, "Middle Band", color=Color1)
//End of Rollover Strength Script
Keltner Channel Enhanced [DCAUT]█ Keltner Channel Enhanced
📊 ORIGINALITY & INNOVATION
The Keltner Channel Enhanced represents an important advancement over standard Keltner Channel implementations by introducing dual flexibility in moving average selection for both the middle band and ATR calculation. While traditional Keltner Channels typically use EMA for the middle band and RMA (Wilder's smoothing) for ATR, this enhanced version provides access to 25+ moving average algorithms for both components, enabling traders to fine-tune the indicator's behavior to match specific market characteristics and trading approaches.
Key Advancements:
Dual MA Algorithm Flexibility: Independent selection of moving average types for middle band (25+ options) and ATR smoothing (25+ options), allowing optimization of both trend identification and volatility measurement separately
Enhanced Trend Sensitivity: Ability to use faster algorithms (HMA, T3) for middle band while maintaining stable volatility measurement with traditional ATR smoothing, or vice versa for different trading strategies
Adaptive Volatility Measurement: Choice of ATR smoothing algorithm affects channel responsiveness to volatility changes, from highly reactive (SMA, EMA) to smoothly adaptive (RMA, TEMA)
Comprehensive Alert System: Five distinct alert conditions covering breakouts, trend changes, and volatility expansion, enabling automated monitoring without constant chart observation
Multi-Timeframe Compatibility: Works effectively across all timeframes from intraday scalping to long-term position trading, with independent optimization of trend and volatility components
This implementation addresses key limitations of standard Keltner Channels: fixed EMA/RMA combination may not suit all market conditions or trading styles. By decoupling the trend component from volatility measurement and allowing independent algorithm selection, traders can create highly customized configurations for specific instruments and market phases.
📐 MATHEMATICAL FOUNDATION
Keltner Channel Enhanced uses a three-component calculation system that combines a flexible moving average middle band with ATR-based (Average True Range) upper and lower channels, creating volatility-adjusted trend-following bands.
Core Calculation Process:
1. Middle Band (Basis) Calculation:
The basis line is calculated using the selected moving average algorithm applied to the price source over the specified period:
basis = ma(source, length, maType)
Supported algorithms include EMA (standard choice, trend-biased), SMA (balanced and symmetric), HMA (reduced lag), WMA, VWMA, TEMA, T3, KAMA, and 17+ others.
2. Average True Range (ATR) Calculation:
ATR measures market volatility by calculating the average of true ranges over the specified period:
trueRange = max(high - low, abs(high - close ), abs(low - close ))
atrValue = ma(trueRange, atrLength, atrMaType)
ATR smoothing algorithm significantly affects channel behavior, with options including RMA (standard, very smooth), SMA (moderate smoothness), EMA (fast adaptation), TEMA (smooth yet responsive), and others.
3. Channel Calculation:
Upper and lower channels are positioned at specified multiples of ATR from the basis:
upperChannel = basis + (multiplier × atrValue)
lowerChannel = basis - (multiplier × atrValue)
Standard multiplier is 2.0, providing channels that dynamically adjust width based on market volatility.
Keltner Channel vs. Bollinger Bands - Key Differences:
While both indicators create volatility-based channels, they use fundamentally different volatility measures:
Keltner Channel (ATR-based):
Uses Average True Range to measure actual price movement volatility
Incorporates gaps and limit moves through true range calculation
More stable in trending markets, less prone to extreme compression
Better reflects intraday volatility and trading range
Typically fewer band touches, making touches more significant
More suitable for trend-following strategies
Bollinger Bands (Standard Deviation-based):
Uses statistical standard deviation to measure price dispersion
Based on closing prices only, doesn't account for intraday range
Can compress significantly during consolidation (squeeze patterns)
More touches in ranging markets
Better suited for mean-reversion strategies
Provides statistical probability framework (95% within 2 standard deviations)
Algorithm Combination Effects:
The interaction between middle band MA type and ATR MA type creates different indicator characteristics:
Trend-Focused Configuration (Fast MA + Slow ATR): Middle band uses HMA/EMA/T3, ATR uses RMA/TEMA, quick trend changes with stable channel width, suitable for trend-following
Volatility-Focused Configuration (Slow MA + Fast ATR): Middle band uses SMA/WMA, ATR uses EMA/SMA, stable trend with dynamic channel width, suitable for volatility trading
Balanced Configuration (Standard EMA/RMA): Classic Keltner Channel behavior, time-tested combination, suitable for general-purpose trend following
Adaptive Configuration (KAMA + KAMA): Self-adjusting indicator responding to efficiency ratio, suitable for markets with varying trend strength and volatility regimes
📊 COMPREHENSIVE SIGNAL ANALYSIS
Keltner Channel Enhanced provides multiple signal categories optimized for trend-following and breakout strategies.
Channel Position Signals:
Upper Channel Interaction:
Price Touching Upper Channel: Strong bullish momentum, price moving more than typical volatility range suggests, potential continuation signal in established uptrends
Price Breaking Above Upper Channel: Exceptional strength, price exceeding normal volatility expectations, consider adding to long positions or tightening trailing stops
Price Riding Upper Channel: Sustained strong uptrend, characteristic of powerful bull moves, stay with trend and avoid premature profit-taking
Price Rejection at Upper Channel: Momentum exhaustion signal, consider profit-taking on longs or waiting for pullback to middle band for reentry
Lower Channel Interaction:
Price Touching Lower Channel: Strong bearish momentum, price moving more than typical volatility range suggests, potential continuation signal in established downtrends
Price Breaking Below Lower Channel: Exceptional weakness, price exceeding normal volatility expectations, consider adding to short positions or protecting against further downside
Price Riding Lower Channel: Sustained strong downtrend, characteristic of powerful bear moves, stay with trend and avoid premature covering
Price Rejection at Lower Channel: Momentum exhaustion signal, consider covering shorts or waiting for bounce to middle band for reentry
Middle Band (Basis) Signals:
Trend Direction Confirmation:
Price Above Basis: Bullish trend bias, middle band acts as dynamic support in uptrends, consider long positions or holding existing longs
Price Below Basis: Bearish trend bias, middle band acts as dynamic resistance in downtrends, consider short positions or avoiding longs
Price Crossing Above Basis: Potential trend change from bearish to bullish, early signal to establish long positions
Price Crossing Below Basis: Potential trend change from bullish to bearish, early signal to establish short positions or exit longs
Pullback Trading Strategy:
Uptrend Pullback: Price pulls back from upper channel to middle band, finds support, and resumes upward, ideal long entry point
Downtrend Bounce: Price bounces from lower channel to middle band, meets resistance, and resumes downward, ideal short entry point
Basis Test: Strong trends often show price respecting the middle band as support/resistance on pullbacks
Failed Test: Price breaking through middle band against trend direction signals potential reversal
Volatility-Based Signals:
Narrow Channels (Low Volatility):
Consolidation Phase: Channels contract during periods of reduced volatility and directionless price action
Breakout Preparation: Narrow channels often precede significant directional moves as volatility cycles
Trading Approach: Reduce position sizes, wait for breakout confirmation, avoid range-bound strategies within channels
Breakout Direction: Monitor for price breaking decisively outside channel range with expanding width
Wide Channels (High Volatility):
Trending Phase: Channels expand during strong directional moves and increased volatility
Momentum Confirmation: Wide channels confirm genuine trend with substantial volatility backing
Trading Approach: Trend-following strategies excel, wider stops necessary, mean-reversion strategies risky
Exhaustion Signs: Extreme channel width (historical highs) may signal approaching consolidation or reversal
Advanced Pattern Recognition:
Channel Walking Pattern:
Upper Channel Walk: Price consistently touches or exceeds upper channel while staying above basis, very strong uptrend signal, hold longs aggressively
Lower Channel Walk: Price consistently touches or exceeds lower channel while staying below basis, very strong downtrend signal, hold shorts aggressively
Basis Support/Resistance: During channel walks, price typically uses middle band as support/resistance on minor pullbacks
Pattern Break: Price crossing basis during channel walk signals potential trend exhaustion
Squeeze and Release Pattern:
Squeeze Phase: Channels narrow significantly, price consolidates near middle band, volatility contracts
Direction Clues: Watch for price positioning relative to basis during squeeze (above = bullish bias, below = bearish bias)
Release Trigger: Price breaking outside narrow channel range with expanding width confirms breakout
Follow-Through: Measure squeeze height and project from breakout point for initial profit targets
Channel Expansion Pattern:
Breakout Confirmation: Rapid channel widening confirms volatility increase and genuine trend establishment
Entry Timing: Enter positions early in expansion phase before trend becomes overextended
Risk Management: Use channel width to size stops appropriately, wider channels require wider stops
Basis Bounce Pattern:
Clean Bounce: Price touches middle band and immediately reverses, confirms trend strength and entry opportunity
Multiple Bounces: Repeated basis bounces indicate strong, sustainable trend
Bounce Failure: Price penetrating basis signals weakening trend and potential reversal
Divergence Analysis:
Price/Channel Divergence: Price makes new high/low while staying within channel (not reaching outer band), suggests momentum weakening
Width/Price Divergence: Price breaks to new extremes but channel width contracts, suggests move lacks conviction
Reversal Signal: Divergences often precede trend reversals or significant consolidation periods
Multi-Timeframe Analysis:
Keltner Channels work particularly well in multi-timeframe trend-following approaches:
Three-Timeframe Alignment:
Higher Timeframe (Weekly/Daily): Identify major trend direction, note price position relative to basis and channels
Intermediate Timeframe (Daily/4H): Identify pullback opportunities within higher timeframe trend
Lower Timeframe (4H/1H): Time precise entries when price touches middle band or lower channel (in uptrends) with rejection
Optimal Entry Conditions:
Best Long Entries: Higher timeframe in uptrend (price above basis), intermediate timeframe pulls back to basis, lower timeframe shows rejection at middle band or lower channel
Best Short Entries: Higher timeframe in downtrend (price below basis), intermediate timeframe bounces to basis, lower timeframe shows rejection at middle band or upper channel
Risk Management: Use higher timeframe channel width to set position sizing, stops below/above higher timeframe channels
🎯 STRATEGIC APPLICATIONS
Keltner Channel Enhanced excels in trend-following and breakout strategies across different market conditions.
Trend Following Strategy:
Setup Requirements:
Identify established trend with price consistently on one side of basis line
Wait for pullback to middle band (basis) or brief penetration through it
Confirm trend resumption with price rejection at basis and move back toward outer channel
Enter in trend direction with stop beyond basis line
Entry Rules:
Uptrend Entry:
Price pulls back from upper channel to middle band, shows support at basis (bullish candlestick, momentum divergence)
Enter long on rejection/bounce from basis with stop 1-2 ATR below basis
Aggressive: Enter on first touch; Conservative: Wait for confirmation candle
Downtrend Entry:
Price bounces from lower channel to middle band, shows resistance at basis (bearish candlestick, momentum divergence)
Enter short on rejection/reversal from basis with stop 1-2 ATR above basis
Aggressive: Enter on first touch; Conservative: Wait for confirmation candle
Trend Management:
Trailing Stop: Use basis line as dynamic trailing stop, exit if price closes beyond basis against position
Profit Taking: Take partial profits at opposite channel, move stops to basis
Position Additions: Add to winners on subsequent basis bounces if trend intact
Breakout Strategy:
Setup Requirements:
Identify consolidation period with contracting channel width
Monitor price action near middle band with reduced volatility
Wait for decisive breakout beyond channel range with expanding width
Enter in breakout direction after confirmation
Breakout Confirmation:
Price breaks clearly outside channel (upper for longs, lower for shorts), channel width begins expanding from contracted state
Volume increases significantly on breakout (if using volume analysis)
Price sustains outside channel for multiple bars without immediate reversal
Entry Approaches:
Aggressive: Enter on initial break with stop at opposite channel or basis, use smaller position size
Conservative: Wait for pullback to broken channel level, enter on rejection and resumption, tighter stop
Volatility-Based Position Sizing:
Adjust position sizing based on channel width (ATR-based volatility):
Wide Channels (High ATR): Reduce position size as stops must be wider, calculate position size using ATR-based risk calculation: Risk / (Stop Distance in ATR × ATR Value)
Narrow Channels (Low ATR): Increase position size as stops can be tighter, be cautious of impending volatility expansion
ATR-Based Risk Management: Use ATR-based risk calculations, position size = 0.01 × Capital / (2 × ATR), use multiples of ATR (1-2 ATR) for adaptive stops
Algorithm Selection Guidelines:
Different market conditions benefit from different algorithm combinations:
Strong Trending Markets: Middle band use EMA or HMA, ATR use RMA, capture trends quickly while maintaining stable channel width
Choppy/Ranging Markets: Middle band use SMA or WMA, ATR use SMA or WMA, avoid false trend signals while identifying genuine reversals
Volatile Markets: Middle band and ATR both use KAMA or FRAMA, self-adjusting to changing market conditions reduces manual optimization
Breakout Trading: Middle band use SMA, ATR use EMA or SMA, stable trend with dynamic channels highlights volatility expansion early
Scalping/Day Trading: Middle band use HMA or T3, ATR use EMA or TEMA, both components respond quickly
Position Trading: Middle band use EMA/TEMA/T3, ATR use RMA or TEMA, filter out noise for long-term trend-following
📋 DETAILED PARAMETER CONFIGURATION
Understanding and optimizing parameters is essential for adapting Keltner Channel Enhanced to specific trading approaches.
Source Parameter:
Close (Most Common): Uses closing price, reflects daily settlement, best for end-of-day analysis and position trading, standard choice
HL2 (Median Price): Smooths out closing bias, better represents full daily range in volatile markets, good for swing trading
HLC3 (Typical Price): Gives more weight to close while including full range, popular for intraday applications, slightly more responsive than HL2
OHLC4 (Average Price): Most comprehensive price representation, smoothest option, good for gap-prone markets or highly volatile instruments
Length Parameter:
Controls the lookback period for middle band (basis) calculation:
Short Periods (10-15): Very responsive to price changes, suitable for day trading and scalping, higher false signal rate
Standard Period (20 - Default): Represents approximately one month of trading, good balance between responsiveness and stability, suitable for swing and position trading
Medium Periods (30-50): Smoother trend identification, fewer false signals, better for position trading and longer holding periods
Long Periods (50+): Very smooth, identifies major trends only, minimal false signals but significant lag, suitable for long-term investment
Optimization by Timeframe: 1-15 minute charts use 10-20 period, 30-60 minute charts use 20-30 period, 4-hour to daily charts use 20-40 period, weekly charts use 20-30 weeks.
ATR Length Parameter:
Controls the lookback period for Average True Range calculation, affecting channel width:
Short ATR Periods (5-10): Very responsive to recent volatility changes, standard is 10 (Keltner's original specification), may be too reactive in whipsaw conditions
Standard ATR Period (10 - Default): Chester Keltner's original specification, good balance between responsiveness and stability, most widely used
Medium ATR Periods (14-20): Smoother channel width, ATR 14 aligns with Wilder's original ATR specification, good for position trading
Long ATR Periods (20+): Very smooth channel width, suitable for long-term trend-following
Length vs. ATR Length Relationship: Equal values (20/20) provide balanced responsiveness, longer ATR (20/14) gives more stable channel width, shorter ATR (20/10) is standard configuration, much shorter ATR (20/5) creates very dynamic channels.
Multiplier Parameter:
Controls channel width by setting ATR multiples:
Lower Values (1.0-1.5): Tighter channels with frequent price touches, more trading signals, higher false signal rate, better for range-bound and mean-reversion strategies
Standard Value (2.0 - Default): Chester Keltner's recommended setting, good balance between signal frequency and reliability, suitable for both trending and ranging strategies
Higher Values (2.5-3.0): Wider channels with less frequent touches, fewer but potentially higher-quality signals, better for strong trending markets
Market-Specific Optimization: High volatility markets (crypto, small-caps) use 2.5-3.0 multiplier, medium volatility markets (major forex, large-caps) use 2.0 multiplier, low volatility markets (bonds, utilities) use 1.5-2.0 multiplier.
MA Type Parameter (Middle Band):
Critical selection that determines trend identification characteristics:
EMA (Exponential Moving Average - Default): Standard Keltner Channel choice, Chester Keltner's original specification, emphasizes recent prices, faster response to trend changes, suitable for all timeframes
SMA (Simple Moving Average): Equal weighting of all data points, no directional bias, slower than EMA, better for ranging markets and mean-reversion
HMA (Hull Moving Average): Minimal lag with smooth output, excellent for fast trend identification, best for day trading and scalping
TEMA (Triple Exponential Moving Average): Advanced smoothing with reduced lag, responsive to trends while filtering noise, suitable for volatile markets
T3 (Tillson T3): Very smooth with minimal lag, excellent for established trend identification, suitable for position trading
KAMA (Kaufman Adaptive Moving Average): Automatically adjusts speed based on market efficiency, slow in ranging markets, fast in trends, suitable for markets with varying conditions
ATR MA Type Parameter:
Determines how Average True Range is smoothed, affecting channel width stability:
RMA (Wilder's Smoothing - Default): J. Welles Wilder's original ATR smoothing method, very smooth, slow to adapt to volatility changes, provides stable channel width
SMA (Simple Moving Average): Equal weighting, moderate smoothness, faster response to volatility changes than RMA, more dynamic channel width
EMA (Exponential Moving Average): Emphasizes recent volatility, quick adaptation to new volatility regimes, very responsive channel width changes
TEMA (Triple Exponential Moving Average): Smooth yet responsive, good balance for varying volatility, suitable for most trading styles
Parameter Combination Strategies:
Conservative Trend-Following: Length 30/ATR Length 20/Multiplier 2.5, MA Type EMA or TEMA/ATR MA Type RMA, smooth trend with stable wide channels, suitable for position trading
Standard Balanced Approach: Length 20/ATR Length 10/Multiplier 2.0, MA Type EMA/ATR MA Type RMA, classic Keltner Channel configuration, suitable for general purpose swing trading
Aggressive Day Trading: Length 10-15/ATR Length 5-7/Multiplier 1.5-2.0, MA Type HMA or EMA/ATR MA Type EMA or SMA, fast trend with dynamic channels, suitable for scalping and day trading
Breakout Specialist: Length 20-30/ATR Length 5-10/Multiplier 2.0, MA Type SMA or WMA/ATR MA Type EMA or SMA, stable trend with responsive channel width
Adaptive All-Conditions: Length 20/ATR Length 10/Multiplier 2.0, MA Type KAMA or FRAMA/ATR MA Type KAMA or TEMA, self-adjusting to market conditions
Offset Parameter:
Controls horizontal positioning of channels on chart. Positive values shift channels to the right (future) for visual projection, negative values shift left (past) for historical analysis, zero (default) aligns with current price bars for real-time signal analysis. Offset affects only visual display, not alert conditions or actual calculations.
📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES
Keltner Channel Enhanced provides improvements over standard implementations while maintaining proven effectiveness.
Response Characteristics:
Standard EMA/RMA Configuration: Moderate trend lag (approximately 0.4 × length periods), smooth and stable channel width from RMA smoothing, good balance for most market conditions
Fast HMA/EMA Configuration: Approximately 60% reduction in trend lag compared to EMA, responsive channel width from EMA ATR smoothing, suitable for quick trend changes and breakouts
Adaptive KAMA/KAMA Configuration: Variable lag based on market efficiency, automatic adjustment to trending vs. ranging conditions, self-optimizing behavior reduces manual intervention
Comparison with Traditional Keltner Channels:
Enhanced Version Advantages:
Dual Algorithm Flexibility: Independent MA selection for trend and volatility vs. fixed EMA/RMA, separate tuning of trend responsiveness and channel stability
Market Adaptation: Choose configurations optimized for specific instruments and conditions, customize for scalping, swing, or position trading preferences
Comprehensive Alerts: Enhanced alert system including channel expansion detection
Traditional Version Advantages:
Simplicity: Fewer parameters, easier to understand and implement
Standardization: Fixed EMA/RMA combination ensures consistency across users
Research Base: Decades of backtesting and research on standard configuration
When to Use Enhanced Version: Trading multiple instruments with different characteristics, switching between trending and ranging markets, employing different strategies, algorithm-based trading systems requiring customization, seeking optimization for specific trading style and timeframe.
When to Use Standard Version: Beginning traders learning Keltner Channel concepts, following published research or trading systems, preferring simplicity and standardization, wanting to avoid optimization and curve-fitting risks.
Performance Across Market Conditions:
Strong Trending Markets: EMA or HMA basis with RMA or TEMA ATR smoothing provides quicker trend identification, pullbacks to basis offer excellent entry opportunities
Choppy/Ranging Markets: SMA or WMA basis with RMA ATR smoothing and lower multipliers, channel bounce strategies work well, avoid false breakouts
Volatile Markets: KAMA or FRAMA with EMA or TEMA, adaptive algorithms excel by automatic adjustment, wider multipliers (2.5-3.0) accommodate large price swings
Low Volatility/Consolidation: Channels narrow significantly indicating consolidation, algorithm choice less impactful, focus on detecting channel width contraction for breakout preparation
Keltner Channel vs. Bollinger Bands - Usage Comparison:
Favor Keltner Channels When: Trend-following is primary strategy, trading volatile instruments with gaps, want ATR-based volatility measurement, prefer fewer higher-quality channel touches, seeking stable channel width during trends.
Favor Bollinger Bands When: Mean-reversion is primary strategy, trading instruments with limited gaps, want statistical framework based on standard deviation, need squeeze patterns for breakout identification, prefer more frequent trading opportunities.
Use Both Together: Bollinger Band squeeze + Keltner Channel breakout is powerful combination, price outside Bollinger Bands but inside Keltner Channels indicates moderate signal, price outside both indicates very strong signal, Bollinger Bands for entries and Keltner Channels for trend confirmation.
Limitations and Considerations:
General Limitations:
Lagging Indicator: All moving averages lag price, even with reduced-lag algorithms
Trend-Dependent: Works best in trending markets, less effective in choppy conditions
No Direction Prediction: Indicates volatility and deviation, not future direction, requires confirmation
Enhanced Version Specific Considerations:
Optimization Risk: More parameters increase risk of curve-fitting historical data
Complexity: Additional choices may overwhelm beginning traders
Backtesting Challenges: Different algorithms produce different historical results
Mitigation Strategies:
Use Confirmation: Combine with momentum indicators (RSI, MACD), volume, or price action
Test Parameter Robustness: Ensure parameters work across range of values, not just optimized ones
Multi-Timeframe Analysis: Confirm signals across different timeframes
Proper Risk Management: Use appropriate position sizing and stops
Start Simple: Begin with standard EMA/RMA before exploring alternatives
Optimal Usage Recommendations:
For Maximum Effectiveness:
Start with standard EMA/RMA configuration to understand classic behavior
Experiment with alternatives on demo account or paper trading
Match algorithm combination to market condition and trading style
Use channel width analysis to identify market phases
Combine with complementary indicators for confirmation
Implement strict risk management using ATR-based position sizing
Focus on high-quality setups rather than trading every signal
Respect the trend: trade with basis direction for higher probability
Complementary Indicators:
RSI or Stochastic: Confirm momentum at channel extremes
MACD: Confirm trend direction and momentum shifts
Volume: Validate breakouts and trend strength
ADX: Measure trend strength, avoid Keltner signals in weak trends
Support/Resistance: Combine with traditional levels for high-probability setups
Bollinger Bands: Use together for enhanced breakout and volatility analysis
USAGE NOTES
This indicator is designed for technical analysis and educational purposes. Keltner Channel Enhanced has limitations and should not be used as the sole basis for trading decisions. While the flexible moving average selection for both trend and volatility components provides valuable adaptability across different market conditions, algorithm performance varies with market conditions, and past characteristics do not guarantee future results.
Key considerations:
Always use multiple forms of analysis and confirmation before entering trades
Backtest any parameter combination thoroughly before live trading
Be aware that optimization can lead to curve-fitting if not done carefully
Start with standard EMA/RMA settings and adjust only when specific conditions warrant
Understand that no moving average algorithm can eliminate lag entirely
Consider market regime (trending, ranging, volatile) when selecting parameters
Use ATR-based position sizing and risk management on every trade
Keltner Channels work best in trending markets, less effective in choppy conditions
Respect the trend direction indicated by price position relative to basis line
The enhanced flexibility of dual algorithm selection provides powerful tools for adaptation but requires responsible use, thorough understanding of how different algorithms behave under various market conditions, and disciplined risk management.
Adv EMA Cloud v6 (ADX, Alerts)Summary:
This indicator provides a multi-faceted view of market trends using Exponential Moving Averages (EMAs) arranged in visually intuitive clouds, enhanced with an optional ADX-based range filter and configurable alerts for key market conditions. It aims to help traders quickly gauge trend alignment across short, medium, and long timeframes while filtering signals during potentially choppy market conditions.
Key Features:
Multiple EMAs: Displays 10-period (Fast), 20-period (Mid), and 50-period (Slow) EMAs.
Long-Term Trend Filter: Includes a 200-period EMA to provide context for the overall dominant trend direction.
Dual EMA Clouds:
Fast/Mid Cloud (10/20 EMA): Fills the area between the 10 and 20 EMAs. Defaults to Green when 10 > 20 (bullish short-term momentum) and Red when 10 < 20 (bearish short-term momentum).
Mid/Slow Cloud (20/50 EMA): Fills the area between the 20 and 50 EMAs. Defaults to Aqua when 20 > 50 (bullish mid-term trend) and Fuchsia when 20 < 50 (bearish mid-term trend).
Optional ADX Range Filter: Uses the Average Directional Index (ADX) to identify potentially non-trending or choppy markets. When enabled and ADX falls below a user-defined threshold, the EMA clouds will turn grey, visually warning that trend-following signals may be less reliable.
Configurable Alerts: Provides several built-in alert conditions using Pine Script's alertcondition function:
Confluence Condition: Triggers when a 10/20 EMA crossover occurs while both EMA clouds show alignment (both bullish/green/aqua or both bearish/red/fuchsia) and price respects the 200 EMA filter and the ADX filter indicates a trend (if filters are enabled).
MA Filter Cross: Triggers when price crosses above or below the 200 EMA filter line.
Full Alignment Start: Triggers on the first bar where full bullish or bearish alignment occurs (both clouds aligned + MA filter respected + ADX trending, if filters are enabled).
How It Works:
EMA Calculation: Standard Exponential Moving Averages are calculated for the 10, 20, 50, and 200 periods based on the closing price.
Cloud Creation: The fill() function visually shades the area between the 10 & 20 EMAs and the 20 & 50 EMAs.
Cloud Coloring: The color of each cloud is determined by the relationship between the two EMAs that define it (e.g., if EMA 10 is above EMA 20, the first cloud is bullish-colored).
ADX Filter Logic: The script calculates the ADX value. If the "Use ADX Trend Filter?" input is checked and the calculated ADX is below the specified "ADX Trend Threshold", the script considers the market potentially ranging.
ADX Visual Effect: During detected ranging periods (if the ADX filter is active), the plotCloud12Color and plotCloud23Color variables are assigned a neutral grey color instead of their normal bullish/bearish colors before being passed to the fill() function.
Alert Logic: Boolean variables track the specific conditions (crossovers, cloud alignment, filter positions, ADX state). The alertcondition() function creates triggerable alerts based on these pre-defined conditions.
Potential Interpretation (Not Financial Advice):
Trend Alignment: When both clouds share the same directional color (e.g., both bullish - Green & Aqua) and price is on the corresponding side of the 200 EMA filter, it may suggest a stronger, more aligned trend. Conversely, conflicting cloud colors may indicate indecision or transition.
Dynamic Support/Resistance: The EMA lines themselves (especially the 20, 50, and 200) can sometimes act as dynamic levels where price might react.
Range Warning: Greyed-out clouds (when ADX filter is enabled) serve as a visual warning that trend-based strategies might face increased difficulty or whipsaws.
Confluence Alerts: The specific confluence alerts signal moments where multiple conditions align (crossover + cloud agreement + filters), which some traders might view as higher-probability setups.
Customization:
All EMA lengths (10, 20, 50, 200) are adjustable via the Inputs menu.
The ADX length and threshold are configurable.
The MA Trend Filter and ADX Trend Filter can be independently enabled or disabled.
Disclaimer:
This indicator is provided for informational and educational purposes only. Trading financial markets involves significant risk. Past performance is not indicative of future results. Always conduct your own thorough analysis and consider your risk tolerance before making any trading decisions. This indicator should be used in conjunction with other analysis methods and tools. Do not trade based solely on the signals or visuals provided by this indicator.






















