COLLABORATION PROJECT WITH:

useThinkScript.com Forum

A visual, color-coded set of indicators to guide a trader from entry to exit of a trade.

Voice and Text Alerts

Scans

THE IMPLEMENTATION OF SWINGARMS AND VALUABLE TOOLS WITHIN UseThinkScript.com

Today we start an opportunity to learn from each other and to support one another in moving forward by sharing our knowledge.

Supporting each other without a conflict of interest but to honestly provide a path to learn and to potentially develop a trading career with the opportunity to change not only your lives but that of those you care about.

Jose Azcarate

blackFLAG SwingArms

Hull Moving Average Turning Points

Trend Momentum Indicator & Support and Resistance Tools.

INTRODUCTION TO blackFLAG Futures Trading System SwingArms

blackFLAG Futures Trading System

A visual indicator color-coded alert system, that allows a futures/stock trader to see an upcoming "Significant Market Move" prior to the event occurring.

Forum Thread

Jose Azcarate

Hull Moving Average Turning Points

Hull Moving Average Concavity and Turning Points.  The Second Derivative of the Hull Moving Average

Author: Seth Urion (Mahsume)
Version: 2020-05-01 V4

Now with support for ToS Mobile

This code is licensed (as applicable) under the GPL v3

Forum Thread
UseThinkScript.com

www.UsetThinkScript.com

Enhanced Trend Reversal Indicator

Assembled by BenTen at useThinkScript.com

Forum Thread

Projection Pivots

ProjectionPivots_v03_JQ
03.04.2019
Original Code and Concept by Mobius:
V01.08.2012 Projection Pivots
 mobius

03.04.2019 added limits on extensions
03.05.2019 adjusted limits on extensions by adding user input upper and lower extension percent limits

Forum Thread

Average Price Movements

Assembled by BenTen at useThinkScript.com
Converted from Trading View

Forum Thread

Chris Auto Trendline

Forum Thread

SUPPORT & RESISTANCE.  BLT HarndogLazyFractalPivots

StudyName: BLT_HarndogLazyFractalPivots
Version/Date: v2 01-13-2016 TOS.mx Link: http://tos.mx/2CTLqx #Type: [Study | Strategy]
Description: Instead of redrafting fractal pivots to frame market behavior
this adaption of Mobius' FractalPivotsArrayV3 was modified by
by BLT/ZZZ/LB using a Harndog test script idea to generate
lazy fractal pivot lines.
Requested By: Harndog in chat starting around 02/12/17

History: TOS.mx Link:

Notes: The idea is based on Mobius Fractal Pivot Array http://tos.mx/Yf06LY

Annotation:
V02: Added ExtLine.Hide: because the script was generating expansion problems

Fractal Pivot Array 11 deep
Mobius
V03.01.2017
V02: Added some information on Basic Wave Structure and labels to hold wave data started
V03: Added User Input for secondary aggregations. Add a label to show what chart aggregation pivots are being plotted. Add a cloud to show the first zone of support/resistance. Altered Support line plot to extend at a consistent slope. Reset UI's for WaveLabel and ShowWaves to no.

True Momentum Indicator

TMO ((T)rue (M)omentum (O)scilator)
Mobius
V01.05.2018
hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, trend reversals, and divergence than momentum oscillators using price.

Forum Thread

Ultimate MACD by Horserider

8/30/2019
Standard version
Also have short and long term versions. Can accomplish all three by just adjusting inputs to fit your trading style.
Standard MACD 12,26,9 BB length 20.
Short term MACD 6, 13, 6 BB length 5.

Forum Thread

blackFLAG SwingArm Code. Update 5/24/2020

# Original Code From: TD Ameritrade IP Company, Inc. (c) 2009-2020
# Original StudyName: ATRTrailingStop
# Type: Study

# blackFLAG FTS SwingArms
# StudyName: blackFLAG_Futures_SwingArm_ATRTrail
# My preferred setting is 28 / 5 FOR ALL TIMEFRAMES
# Edited by: Jose Azcarate
# blackFLAG Futures Trading - FOR EDUCATIONAL PURPOSES ONLY
# TWITTER: @blackflagfuture
# UPDATED: 5/16/2020

# NOTE: WHEN IMPORTING STUDY, MAKE SURE YOU UPDATE THE LOOK AND FEEL TO MATCH MY CHARTS WITHIN THE STUDY SETTINGS.

#-----------------------------------
#-----------------------------------
# BUY & SELL ALERTS ARE CREATED BY THE HULL MOVING AVERAGE TURNING POINTS STUDY AND MUST BE IN AGREEMENT WITH SWINGARM SUPPORT OR RESISTANCE ZONES TO BE VALID. (UseThinkScript.com by mashume - Upper Study). MY UPDATED CODE INCLUDES THE BUY / SELL BUBBLES. THE SETTINGS ARE: 1 MIN: 255 PERIOD; 5 MIN: 255 PERIOD; 4 HOUR 255 PERIOD.
#-----------------------------------
#-----------------------------------

input trailType = {default modified, unmodified};
input ATRPeriod = 28;
input ATRFactor = 5;
input firstTrade = {default long, short};
input averageType = AverageType.WILDERS;

input fib1Level = 61.8;
input fib2Level = 78.6;
input fib3Level = 88.6;

Assert(ATRFactor > 0, "'atr factor' must be positive: " + ATRFactor);

def HiLo = Min(high - low, 1.5 * Average(high - low, ATRPeriod));
def HRef = if low <= high[1]
then high - close[1]
else (high - close[1]) - 0.5 * (low - high[1]);
def LRef = if high >= low[1]
then close[1] - low
else (close[1] - low) - 0.5 * (low[1] - high);

def trueRange;
switch (trailType) {
case modified:
trueRange = Max(HiLo, Max(HRef, LRef));
case unmodified:
trueRange = TrueRange(high, close, low);
}
def loss = ATRFactor * MovingAverage(averageType, trueRange, ATRPeriod);

def state = {default init, long, short};
def trail;
switch (state[1]) {
case init:
if (!IsNaN(loss)) {
switch (firstTrade) {
case long:
state = state.long;
trail = close - loss;
case short:
state = state.short;
trail = close + loss;
}
} else {
state = state.init;
trail = Double.NaN;
}
case long:
if (close > trail[1]) {
state = state.long;
trail = Max(trail[1], close - loss);
} else {
state = state.short;
trail = close + loss;
}
case short:
if (close < trail[1]) {
state = state.short;
trail = Min(trail[1], close + loss);
} else {
state = state.long;
trail = close - loss;
}
}

def BuySignal = Crosses(state == state.long, 0, CrossingDirection.ABOVE);
def SellSignal = Crosses(state == state.short, 0, CrossingDirection.ABOVE);

def ex = if BuySignal then high else if SellSignal then low else if state == state.long then Max(ex[1], high) else if state == state.short then Min(ex[1], low) else ex[1];

plot TrailingStop = trail;

TrailingStop.SetPaintingStrategy(PaintingStrategy.POINTS);
TrailingStop.DefineColor("Long", Color.GREEN);
TrailingStop.DefineColor("Short", Color.RED);
TrailingStop.AssignValueColor(if state == state.long
then TrailingStop.Color("Long")
else TrailingStop.Color("Short"));

plot Extremum = ex;
Extremum.SetPaintingStrategy(PaintingStrategy.POINTS);
Extremum.DefineColor("HH", Color.GREEN);
Extremum.DefineColor("LL", Color.RED);
Extremum.AssignValueColor(if state == state.long
then Extremum.Color("HH")
else Extremum.Color("LL"));
Extremum.Hide();

def f1 = ex + (trail - ex) * fib1Level / 100;
def f2 = ex + (trail - ex) * fib2Level / 100;
def f3 = ex + (trail - ex) * fib3Level / 100;
def l100 = trail + 0;

plot Fib1 = f1;
Fib1.SetPaintingStrategy(PaintingStrategy.POINTS);
Fib1.SetDefaultColor(Color.BLACK);
Fib1.Hide();

plot Fib2 = f2;
Fib2.SetPaintingStrategy(PaintingStrategy.POINTS);
Fib2.SetDefaultColor(Color.BLACK);
Fib2.Hide();

plot Fib3 = f3;
Fib3.SetPaintingStrategy(PaintingStrategy.POINTS);
Fib3.SetDefaultColor(Color.BLACK);
Fib3.Hide();

AddCloud(f1, f2, Color.LIGHT_GREEN, Color.LIGHT_RED, no);
AddCloud(f2, f3, Color.GREEN, Color.RED, no);
AddCloud(f3, l100, Color.DARK_GREEN, Color.DARK_RED, no);

def l1 = state[1] == state.long and close crosses below f1[1];
def l2 = state[1] == state.long and close crosses below f2[1];
def l3 = state[1] == state.long and close crosses below f3[1];
def s1 = state[1] == state.short and close crosses above f1[1];
def s2 = state[1] == state.short and close crosses above f2[1];
def s3 = state[1] == state.short and close crosses above f3[1];

def atr = Average(TrueRange(high, close, low), 14);

plot LS1 = if l1 then low - atr else Double.NaN;
plot LS2 = if l2 then low - 1.5 * atr else Double.NaN;
plot LS3 = if l3 then low - 2 * atr else Double.NaN;
plot SS1 = if s1 then high + atr else Double.NaN;
plot SS2 = if s2 then high + 1.5 * atr else Double.NaN;
plot SS3 = if s3 then high + 2 * atr else Double.NaN;

LS1.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
LS1.SetDefaultColor(Color.GREEN);
LS1.SetLineWeight(1);
LS1.Hide();
LS2.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
LS2.SetDefaultColor(Color.GREEN);
LS2.SetLineWeight(1);
LS2.Hide();
LS3.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
LS3.SetDefaultColor(Color.GREEN);
LS3.SetLineWeight(1);
LS3.Hide();

SS1.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
SS1.SetDefaultColor(Color.RED);
SS1.SetLineWeight(1);
SS1.Hide();
SS2.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
SS2.SetDefaultColor(Color.RED);
SS2.SetLineWeight(1);
SS2.Hide();
SS3.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
SS3.SetDefaultColor(Color.RED);
SS3.SetLineWeight(1);
SS3.Hide();

Alert(l1, "Price crossed below Fib1 level in long trend", Alert.BAR, Sound.Bell);
Alert(l2, "Price crossed below Fib2 level in long trend", Alert.BAR, Sound.Bell);
Alert(l3, "Price crossed below Fib3 level in long trend", Alert.BAR, Sound.Bell);
Alert(s1, "Price crossed above Fib1 level in short trend", Alert.BAR, Sound.Bell);
Alert(s2, "Price crossed above Fib2 level in short trend", Alert.BAR, Sound.Bell);
Alert(s3, "Price crossed above Fib3 level in short trend", Alert.BAR, Sound.Bell);

# *******************************************************
# DAY TRADING SETTINGS USING 1 AND 5 MINUTE CHARTS

AddLabel(yes," DAY TRADING STRATEGY : ",color.WHITE);
AddLabel(yes, if ohlc4 > TrailingStop then "* IF * 5 Min. SWINGARM Is BULLISH - Buy 1 Min. Zone 4" else "* IF * 5 MIN. SWINGARM - Is BEARISH - Sell 1 Min Zone 4", if ohlc4 > TrailingStop then Color.GREEN else Color.Red);

# SWING TRADING SETTINGS USING 4 HOUR CHART ( needs work below )

# AddLabel(yes," SWING TRADING STRATEGY : ",color.WHITE);
# AddLabel(yes, if ohlc4 > TrailingStop then "* IF * 4 Hour SWINGARM Is BULLISH - Wait For Entry Confirmation" else "* IF * 4 Hour SWINGARM - Is BEARISH - Wait For Entry Confirmation", if ohlc4 > TrailingStop then Color.GREEN else Color.RED);

BUY SUPPORT / SELL RESISTANCE BUBBLES FOR SWINGARMS

# blackFLAG FTS Bubbles BUY SUPPORT - SELL RESISTANCE
# 5-24-2020
# Source: Pete Hann https://www.hahn-tech.com/

input trailType = {default modified, unmodified};
input ATRPeriod = 28;
input ATRFactor = 5;
input firstTrade = {default long, short};
input averageType = AverageType.WILDERS;
Assert(ATRFactor > 0, "'atr factor' must be positive: " + ATRFactor);
def HiLo = Min(high - low, 1.5 * Average(high - low, ATRPeriod));
def HRef = if low <= high[1] then high - close[1] else (high - close[1]) - 0.5 * (low - high[1]); def LRef = if high >= low[1]
then close[1] - low
else (close[1] - low) - 0.5 * (low[1] - high);
def trueRange;
switch (trailType) {
case modified:
trueRange = Max(HiLo, Max(HRef, LRef));
case unmodified:
trueRange = TrueRange(high, close, low);
}
def loss = ATRFactor * MovingAverage(averageType, trueRange, ATRPeriod);
def state = {default init, long, short};
def trail;
switch (state[1]) {
case init:
if (!IsNaN(loss)) {
switch (firstTrade) {
case long:
state = state.long;
trail = close - loss;
case short:
state = state.short;
trail = close + loss;
}
} else {
state = state.init;
trail = Double.NaN;
}
case long:
if (close > trail[1]) {
state = state.long;
trail = Max(trail[1], close - loss);
} else {
state = state.short;
trail = close + loss;
}
case short:
if (close < trail[1]) {
state = state.short;
trail = Min(trail[1], close + loss);
} else {
state = state.long;
trail = close - loss;
}
}
plot BuySignal = if Crosses(state == state.long, 0, CrossingDirection.ABOVE) then low else Double.NaN;
BuySignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot SellSignal = if Crosses(state == state.short, 0, CrossingDirection.ABOVE) then high else Double.NaN;
SellSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
plot TrailingStop = trail;
TrailingStop.SetPaintingStrategy(PaintingStrategy.POINTS);
TrailingStop.DefineColor("Buy", GetColor(0));
TrailingStop.DefineColor("Sell", GetColor(1));
TrailingStop.AssignValueColor(if state == state.long
then TrailingStop.Color("Sell")
else TrailingStop.Color("Buy"));
Alert(BuySignal, "Trail Stop Long Entry", Alert.BAR, Sound.DING);
Alert(SellSignal, "Trail Stop Short Entry", Alert.BAR, Sound.DING);

AddChartBubble(BuySignal == BuySignal , BuySignal , "BUY SUPPORT", Color.GREEN,no);
AddChartBubble(SellSignal == SellSignal , SellSignal , "SELL RESISTANCE", Color.RED, yes);

ALERTS FOR SWINGARMS TRADE ENTRY - Sell Confirmed / Buy Confirmed Bubbles

# blackFLAG FTS Alerts for SwingArms
# 5-24-2020

# Hull Moving Average Concavity and Turning Points
# or
# The Second Derivative of the Hull Moving Average
#
# Author: Seth Urion (Mahsume)
# Version: 2020-05-01 V4
#
# Now with support for ToS Mobile
#
# This code is licensed (as applicable) under the GPL v3
# UseThinkScript.com
# https://usethinkscript.com/threads/hull-moving-average-turning-points-and-concavity-2nd-derivatives.1803/page-14#post-23080
# ----------------------

# INSTRUCTIONS:
# SETTINGS TO SET UP ALERT NOTIFICATIONS - JAzcarate -
# BUY / SELL CHART ALERTS WITH EMAIL / TEXT
# STUDY NAME: HULL MOVING AVERAGE TURNING POINTS
# 1 MINUTE CHART SETTING 255 period HMA
# 5 MINUTE CHART SETTING 255 period HMA
# 4 Hour CHART SETTING 255 PERIOD HMA

# SELL FROM RESISTANCE - BUY FROM SUPPORT

declare upper;

input price = HL2;
input HMA_Length = 55;
input lookback = 2;

# I read somewhere that it's faster to define nan's and then use the def'd var rather than call double.nan every time.
def nan = double.nan;

plot HMA = HullMovingAvg(price = price, length = HMA_Length);

def delta = HMA[1] - HMA[lookback + 1];
def delta_per_bar = delta / lookback;

def next_bar = HMA[1] + delta_per_bar;

def concavity = if HMA > next_bar then 1 else -1;

plot turning_point = if concavity[1] != concavity then HMA else nan;

HMA.AssignValueColor(color = if concavity[1] == -1 then
if HMA > HMA[1] then color.dark_orange else color.red else
if HMA < HMA[1] then color.dark_green else color.green);

HMA.SetLineWeight(3);

turning_point.SetLineWeight(4);
turning_point.SetPaintingStrategy(paintingStrategy = PaintingStrategy.POINTS);
turning_point.SetDefaultColor(color.white);

plot MA_Max = if HMA[-1] < HMA and HMA > HMA[1] then HMA else NaN;
MA_Max.SetDefaultColor(Color.WHITE);
MA_Max.SetPaintingStrategy(PaintingStrategy.SQUARES);
MA_Max.SetLineWeight(3);

plot MA_Min = if HMA[-1] > HMA and HMA < HMA[1] then HMA else Nan;
MA_Min.SetDefaultColor(Color.WHITE);
MA_Min.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
MA_Min.SetLineWeight(3);

# NOTE: I PREFER TO TURN OFF UP ARROWS WHEN IN DOWN TREND. IF IN DOWNTRENDING SWINGARM, THE TURN ON ONLY DOWN SELL ARROWS. YOU CAN DO THIS USING THE INPUT SETTINGS SCREEN.

plot sell = if turning_point and concavity == -1 then high else nan;
sell.SetDefaultColor(Color.DARK_ORANGE);
sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
sell.SetLineWeight(3);

plot buy = if turning_point and concavity == 1 then low else nan;
buy.SetDefaultColor(Color.CYAN);
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetLineWeight(3);

def divergence = HMA - next_bar;

addLabel(yes, concat("DIVERGENCE: " , divergence), color = if concavity < 0 then if divergence[1] > divergence then Color.RED else color.PINK else if divergence[1] < divergence then color.green else color.yellow);

###################
#
# ALERTS
#
###################

Alert(condition = buy, text = "Buy", "alert type" = Alert.BAR, sound = Sound.Bell);

Alert(condition = sell, text = "Sell", "alert type" = Alert.BAR, sound = Sound.Chimes);

###################
#
# 2020-05-01
#
# MOBILE TOS SUPPORT
#
# Each color of the HMA needs to be a separate plot as ToS Mobile
# lacks the ability to assign colors the way ToS Desktop does.
# I recommend a plain colored HMA behind the line
# Set the line color of the HMA above to gray or some neutral
#
# CCD_D -> ConCave Down and Decreasing
# CCD_I -> ConCave Down and Increasing
# CCU_D -> ConCave Up and Decreasing
# CCU_I -> ConCave Up and Increasing
#
###################
plot CCD_D = if concavity == -1 and HMA < HMA[1] then HMA else nan;
CCD_D.SetDefaultColor(Color.RED);
CCD_D.SetLineWeight(3);

plot CCD_I = if concavity == -1 and HMA >= HMA[1] then HMA else nan;
CCD_I.SetDefaultColor(Color.DARK_ORANGE);
CCD_I.SetLineWeight(3);

plot CCU_D = if concavity == 1 and HMA <= HMA[1] then HMA else nan;
CCU_D.SetDefaultColor(COLOR.DARK_GREEN);
CCU_D.SetLineWeight(3);

plot CCU_I = if concavity == 1 and HMA > HMA[1] then HMA else nan;
CCU_I.SetDefaultColor(COLOR.GREEN);
CCU_I.SetLineWeight(3);

AddChartBubble(MA_MAX == MA_MAX , MA_MAX , "SELL Confirmed" , Color.YELLOW,no);

AddChartBubble(MA_MIN == MA_MIN , MA_MIN , "BUY Confirmed" , Color.YELLOW, yes);

Code For Average Price Movement with BUY / SELL Levels Warnings

# Average Price Movements
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/eHhGyI6R-CD-Average-Daily-Range-Zones-highs-and-lows-of-the-day/

input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def high = high(period = aggregationPeriod);
def low = low(period = aggregationPeriod);
def dayrange = (high - low);

def r1 = dayrange[1];
def r2 = dayrange[2];
def r3 = dayrange[3];
def r4 = dayrange[4];
def r5 = dayrange[5];
def r6 = dayrange[6];
def r7 = dayrange[7];
def r8 = dayrange[8];
def r9 = dayrange[9];
def r10 = dayrange[10];

def adr_10 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10) / 10;
def adr_5 = (r1 + r2 + r3 + r4 + r5) / 5;

def hl1 = (open + (adr_10 / 2));
def ll1 = (open - (adr_10 / 2));
def hl2 = (open + (adr_5 / 2));
def ll2 = (open - (adr_5 / 2));

def h1 = hl1;
def l1 = ll1;
def h2 = hl2;
def l2 = ll2;

AddCloud(h1, h2, Color.RED, Color.RED);
AddCloud(l1, l2, Color.GREEN, Color.GREEN);

#h1.SetDefaultColor(Color.dark_red);
#h2.SetDefaultColor(Color.DARK_RED);
#l1.SetDefaultColor(Color.dark_green);
#l2.SetDefaultColor(Color.dark_green);

#Edited By Playstation 23.05.2020
#You can set whether to show the bubbles. Change or add the h1,h2,l1,l2 values to your preference.

input showBubble = yes;
def SR = showBubble and !IsNaN(close) and IsNaN(close [-1] ) && HighestAll(BarNumber());

#This will show the price at the support and resistance levels.
#AddChartBubble(SR,h2,Concat("R: ",Round(h2)),Color.RED);
#AddChartBubble(SR,l2,Concat("S: ",Round(l2)),Color.GREEN);

#Swap hashtags if you want just the Resistance/Support words.
AddChartBubble(SR, h2, "POSSIBLE SELL AT DAILY RESISTANCE", Color.RED);
AddChartBubble(SR, l2, "POSSIBLE BUY AT DAILY SUPPORT", Color.GREEN);

Credits

janelle-awkward-awards

Awkward but social