Good Morning, I have a question about the Theo Quad Indicator written by Mobius ,specifically this setting. What does the .5 represent, if this number is increased to .8, or decreased to .2 what type of an affect does this have on the indicator? Any feed back would be appreciated.
Thanks
CumTickMomo < .5 and
ADMomo < .5 and
BreadthMomo < .5 and
PriceMomo < .5
Thanks
CumTickMomo < .5 and
ADMomo < .5 and
BreadthMomo < .5 and
PriceMomo < .5
Code:
# TheoQuad_Intraday
# Mobius Dev
# Copyright TheoTrade LLC
# V03.25.2017
#hint: <b>This Study is for intraday trading only. The study uses Consolidated TICK, Advance Decline, Volume Breadth and Price for Trend Momentum. When all 4 agree the study plots a directional marker and colors the candles blue for ascending or yellow for descending price. The markers and candle color can be turned on and off with user inputs. The "n" input is for momentum length calculations.\n Trading Note: Look for the candle color or trend market to "stop plotting" for indication trend may be slowing, possibly changing.
declare hide_on_daily;
input n = 6; #hint n: Length for Momentum calculations.
input CandleColor = yes;
input TrendMarkers = no;
input ShowData = yes;
input TickSymb = {default "$TIKSP", "$TICK", "$TICK/Q"};
def tick = if IsNaN(close("$TIKSP"))
then tick[1]
else close("$TICK/Q");
def AD = if IsNaN(close("$ADSPD"))
then AD[1]
else close("$ADSPD");
def Breadth = if IsNaN(close("$VOLSPD"))
then Breadth[1]
else close("$VOLSPD");
def price = close;
def Hrs = Floor(9.5 + SecondsFromTime(0930) / 60 / 60) - 1;
def Min = ((9.5 + SecondsFromTime(930) / 60 / 60) % 1) * 60;
def active = if SecondsFromTime(0930) >= 0 and
SecondsTillTime(1600) >= 0
then 1
else 0;
def lowestAD = if Active and !Active[1]
then AD
else if Active and
AD < lowestAD[1]
then AD
else lowestAD[1];
def AD_low_Time_Hrs = if AD == lowestAD
then Hrs
else AD_low_Time_Hrs[1];
def AD_low_Time_min = if AD == lowestAD
then min
else AD_low_Time_min[1];
def highestAD = if Active and !Active[1]
then AD
else if Active and
AD > highestAD[1]
then AD
else highestAD[1];
def AD_high_Time_Hrs = if AD == highestAD
then Hrs
else AD_high_Time_Hrs[1];
def AD_high_Time_min = if AD == highestAD
then min
else AD_high_Time_min[1];
def sumAD = if Active and !Active[1]
then AD
else if Active
then sumAD[1] + AD
else sumAD[1];
def barLength = if Active and !Active[1]
then 1
else if Active
then barLength[1] + 1
else barLength[1];
def MA_AD = sumAD / barLength;
def CumTick = fold i = 0 to active
with p
while active
do CumTick[1] + tick;
def CumTickMomo = (CumTick - Lowest(CumTick, n)) /
(Highest(CumTick, n) - Lowest(CumTick, n));
def ADMomo = (AD - Lowest(AD, n)) /
(Highest(AD, n) - Lowest(AD, n));
def BreadthMomo = (Breadth - Lowest(Breadth, n)) /
(Highest(Breadth, n) - Lowest(Breadth, n));
def PriceMomo = (price - Lowest(price, n)) /
(Highest(price, n) - Lowest(price, n));
plot QuadTrendUp = if CumTickMomo > .5 and
ADMomo > .5 and
BreadthMomo > .5 and
PriceMomo > .5
then low - TickSize()
else Double.NaN;
QuadTrendUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_WEDGE_UP);
QuadTrendUp.SetLineWeight(1);
QuadTrendUp.SetDefaultColor(Color.GREEN);
QuadTrendUp.SetHiding(!TrendMarkers);
plot QuadTrendDn = if [B]CumTickMomo < .5 and
ADMomo < .5 and
BreadthMomo < .5 and
PriceMomo < .5[/B]
then high + TickSize()
else Double.NaN;
QuadTrendDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_WEDGE_DOWN);
QuadTrendDn.SetLineWeight(1);
QuadTrendDn.SetDefaultColor(Color.Black);
QuadTrendDn.SetHiding(!TrendMarkers);
AssignPriceColor(if CandleColor and !IsNaN(QuadTrendUp)
then Color.Green
else if CandleColor and !IsNaN(QuadTrendDn)
then Color.Red
else Color.CURRENT);
AddLabel(ShowData, "Quad Data: " +
" Tick = " + tick +
" || AD = " + AD +
" Highest AD = " + highestAD + " At: " + AD_high_Time_Hrs + ":" + AD_high_Time_min +
" Lowest AD = " + lowestAD + " At: " + AD_low_Time_Hrs + ":" + AD_low_Time_min +
" Avg AD = " + Round(MA_AD, 0) +
" || Breadth = " + Round(Breadth / 1000000, 2) + "m",
if !IsNaN(QuadTrendUp)
then Color.Green
else if !IsNaN(QuadTrendDn)
then Color.Red
else Color.yellow);
# End Code TheoQuad_Intraday
Last edited by a moderator: