Sharing Mobius’ "AD_TICK_V02" indicator, which tracks $ADSPD and $TICK. I enhanced the indicator with a market bias/sentiment filter and Mobius' Fractal Linear Energy code to create labels and dots which acts as a warning.
Fractal Linear Energy is a technical analysis concept that measures the “efficiency” or strength of price movement, helping traders identify whether the market is trending (linear/exhaustion) or consolidating (non‑linear/compression).
## 17:33 Mobius: Example of a great indicator. Learning what this indicator is telling you will keep you on the right side of intraday trades all day long.
## 17:34 Mobius: And it's simple.
Fractal Linear Energy is a technical analysis concept that measures the “efficiency” or strength of price movement, helping traders identify whether the market is trending (linear/exhaustion) or consolidating (non‑linear/compression).
- When Fractal Linear Energy signals Linearity/Exhaustion, a yellow dot and yellow label is displayed.
- When Fractal Linear Energy indicates Non‑linearity/Compression, a cyan dot and cyan label will appear.
## 17:33 Mobius: Example of a great indicator. Learning what this indicator is telling you will keep you on the right side of intraday trades all day long.
## 17:34 Mobius: And it's simple.
Code:
# AD, TICK Study
# Mobius
declare lower;
input show_AD_labels = yes;
input show_TICK_labels = yes;
input show_Market_Bias_labels = yes;
def RTH = GetTime() >= RegularTradingStart(GetYYYYMMDD()) and
GetTime() <= RegularTradingEnd(GetYYYYMMDD());
def x = if RTH and !RTH[1]
then 1
else if RTH then x[1] + 1
else x[1];
def o = if RTH and !RTH[1]
then open(symbol = "$ADSPD")
else o[1];
def h = if RTH and !RTH[1]
then high(symbol = "$ADSPD")
else if high(symbol = "$ADSPD") > h[1]
then high(symbol = "$ADSPD")
else h[1];
def l = if RTH and !RTH[1]
then low(symbol = "$ADSPD")
else if low(symbol = "$ADSPD") < l[1]
then low(symbol = "$ADSPD")
else l[1];
def c = if IsNaN(close(symbol = "$ADSPD"))
then c[1]
else close(symbol = "$ADSPD");
def sumC = if RTH and !RTH[1]
then c
else if RTH
then sumC[1] + c
else sumC[1];
plot cumC = if RTH and !IsNaN(close)
then sumC / x
else Double.NaN;
cumC.SetStyle(Curve.FIRM);
cumC.AssignValueColor(if cumC > cumC[1]
then Color.GREEN
else Color.RED);
cumC.SetLineWeight(1);
cumC.HideBubble();
cumC.HideTitle();
plot AD = if RTH and !IsNaN(close)
then Round(Inertia(c, 13), 0)
else Double.NaN;
AD.SetStyle(Curve.FIRM);
AD.SetLineWeight(2);
AD.AssignValueColor(if AD > cumC and AD > AD[1]
then Color.DARK_GREEN
else if AD > cumC and AD < AD[1]
then Color.GREEN
else if AD < cumC and AD < AD[1]
then Color.DARK_RED
else Color.RED);
AddLabel(1, "AD open = " + o +
" high = " + h +
" low = " + l +
" close = " + c, if AD < AD[1]
then Color.RED
else Color.GREEN);
def t = if IsNaN(close(symbol = "$TICK"))
then t[1]
else close(symbol = "$TICK");
def sumT = if RTH and !RTH[1]
then t
else if RTH
then sumT[1] + t
else sumT[1];
plot cumT = if RTH and !IsNaN(close)
then sumT / x
else Double.NaN;
cumT.SetStyle(Curve.FIRM);
cumT.AssignValueColor(if cumT > cumT[1]
then Color.BLUE
else Color.YELLOW);
cumT.SetLineWeight(2);
cumT.HideBubble();
cumT.HideTitle();
plot avg_t = if RTH and !IsNaN(close)
then Round(Inertia(t, 10), 0)
else Double.NaN;
avg_t.SetLineWeight(2);
avg_t.AssignValueColor(if avg_t > cumT then Color.BLUE else Color.YELLOW);
plot zero = if RTH and !IsNaN(close("$TICK"))
then 0
else Double.NaN;
zero.SetStyle(Curve.LONG_DASH);
zero.SetDefaultColor(Color.Gray);
zero.SetLineWeight(2);
AddCloud(cumC, AD, Color.RED, Color.GREEN);
AddCloud(cumT, avg_t, Color.YELLOW, Color.BLUE);
AddCloud(0, if AD < cumC and AD > 0
then AD
else double.nan, Color.light_gray, color.light_gray);
AddLabel(1, "TICK = " + t, if avg_t > avg_t[1] then Color.GREEN else Color.RED);
Alert(t >= 1000, "", Alert.BAR, Sound.Ring);
Alert(t <= -1000, "", Alert.BAR, Sound.Bell);
AddVerticalLine(t crosses above 1000, "TICK 1000", Color.GREEN);
AddVerticalLine(t crosses below -1000, "TICK -1000", Color.RED);
# #######################################################
# Enhanced Labels for AD Section (Market Breadth)
# #######################################################
# Current AD value
# Cumulative average (cumC)
# Trend direction (Rising/Falling)
# Status relative to average (Bullish/Bearish)
# Color coding matches strength: dark green = strong bullish, dark red = strong bearish.
AddLabel(show_AD_labels,
"AD Breadth | Current: " + AD +
" | CumAvg: " + cumC +
" | Trend: " + (if AD > AD[1] then "Rising" else "Falling") +
" | Status: " + (if AD > cumC then "Above Avg (Bullish)" else "Below Avg (Bearish)"),
if AD > cumC and AD > AD[1] then Color.DARK_GREEN
else if AD > cumC and AD < AD[1] then Color.GREEN
else if AD < cumC and AD < AD[1] then Color.DARK_RED
else Color.RED);
# #######################################################
# Enhanced Labels for TICK Section (Market Sentiment)
# #######################################################
# Current raw TICK value
# Smoothed average (avg_t)
# Cumulative average (cumT)
# Trend direction (Rising/Falling)
# Status relative to average (Positive/Negative)
#Color coding highlights sentiment strength: blue = strong positive, orange = strong negative.
AddLabel(show_TICK_labels,
"TICK Sentiment | Current: " + t +
" | Avg: " + avg_t +
" | CumAvg: " + cumT +
" | Trend: " + (if avg_t > avg_t[1] then "Rising" else "Falling") +
" | Status: " + (if avg_t > cumT then "Above Avg (Positive)" else "Below Avg (Negative)"),
if avg_t > cumT and avg_t > avg_t[1] then Color.CYAN
else if avg_t > cumT and avg_t < avg_t[1] then Color.ORANGE
else if avg_t < cumT and avg_t < avg_t[1] then Color.LIGHT_RED
else Color.YELLOW);
# #######################################################
# Combined Market Condition Label
# #######################################################
# Strong Bullish: Both AD and TICK are above their averages and rising → higher probability long trades.
# Strong Bearish: Both AD and TICK are below their averages and falling → higher probability short trades.
# Mixed: Breadth and sentiment disagree → caution, wait for confirmation.
# Neutral/Choppy: No clear alignment → avoid trades or scalp only.
AddLabel(show_Market_Bias_labels,
"Market Bias | " +
(if AD > cumC and AD > AD[1] and avg_t > cumT and avg_t > avg_t[1]
then "Sentiment Rising)"
else if AD < cumC and AD < AD[1] and avg_t < cumT and avg_t < avg_t[1]
then "Sentiment Falling)"
else if AD > cumC and avg_t < cumT
then "Sentiment Bearish"
else if AD < cumC and avg_t > cumT
then "Sentiment Bullish"
else "Neutral / Choppy"),
(if AD > cumC and AD > AD[1] and avg_t > cumT and avg_t > avg_t[1]
then Color.DARK_GREEN
else if AD < cumC and AD < AD[1] and avg_t < cumT and avg_t < avg_t[1]
then Color.DARK_RED
else Color.GRAY));
# Fractal Linear Energy
# Mobius
# 5.16.2016
# zztop Notes
# This indicator does NOT indicate OB or OS but linear or non-linear
# The closer to 1 the more non-linear (compressed or random) price is.
# The closer to 0 the more linear (trending) price is.
# Fractal Energy isn't an indicator - it's a way of looking at price
# to see if it's linear or random. There are NO trading signals on the
# FE study. Only signals NOT to trade.
#
# If the FE is at extremes, something is about to change. It's leading
# you to a conclusion. If the FE is below .382, price is parabolic and
# cannot maintain that. But you may not want to sell because it may
# still go further in it's trend and it may not change direction right
# away. It's telling you though that it's not going to stay trending
# at the current rate of speed. If it's over .618 it telling you price
# is compressing and going sideways rebuilding energy getting ready for
# another run one way ot the other.
#
# Using price in fractals and different times, or ORB with FE and
# supertrend or some way to measure when price expansion is contracting
# or expanding is all you need. Any more than that and you'll be
# paralyzed by information overload
#
# FE does not indicate direction at all. It simply shows linearity or
# non-linearity. Trend or non-trend. It has nothing that determines
# which way trend is going, as in up or down.
#
# Lets say you want to buy ABC company. FE on a monthly, weekly and daily
# shows values of 40, 35 and 30. Price is showing lower lows but random
# lower high. You would know ABC company is close to selling exhaustion
# and it's time to look for a few higher highs to a near term fractal
# pivot then look for short reversal to a higher low over the previous
# recent low and when the bars start setting high highs and lower lows
# again it's time to go long. The FE is what tells you to start looking
# for those signals
input lengthFE = 13;
input valueFEnonlinear = 0.618;
input valueFElinear = .382;
def FE = Round (Log(Sum(Max(high, close[1]) - Min(low, close[1]), lengthFE) /
(Highest(high, lengthFE) - Lowest(low, lengthFE))) /
Log(lengthFE), numberofdigits = 2);
plot lineLinear = 0;
lineLinear.SetDefaultColor(Color.white);
lineLinear.setHiding(2);
plot pointsLinear = if FE < valueFElinear
then lineLinear #l - (2 * TickSize())
else Double.NaN;
pointsLinear.SetPaintingStrategy(PaintingStrategy.POINTS);
pointsLinear.SetLineWeight(2.5);
pointsLinear.SetDefaultColor(Color.yellow);
plot lineNonLinear = 0;
lineNonLinear.SetDefaultColor(Color.white);
lineNonLinear.setHiding(2);
plot pointsNonLinear = if FE > valueFEnonlinear
then lineNonLinear #l - (2 * TickSize())
else Double.NaN;
pointsNonLinear.SetPaintingStrategy(PaintingStrategy.POINTS);
pointsNonLinear.SetLineWeight(2.5);
pointsNonLinear.SetDefaultColor(Color.cyan);
AddLabel(
FE < valueFElinear,
"Linearity/Exhaustion (" + valueFElinear + ")",
Color.YELLOW
);
AddLabel(
FE > valueFEnonlinear,
"Non-linearity/Compression (" + valueFEnonlinear + ")",
Color.CYAN
);
# End Code
Last edited: