kshires4: Can you please provide the script for a Thinkorswim Watchlist for your Hull Moving Avg Turning Points which shows the different colors of light green, dark green, red and orange? Of particular interest to me is the orange arrows sell/buy arrows (as a suggestion, change these colors to red and green). Need and example? Look no further than Welkin's example at this link... https://usethinkscript.com/threads/obv-histogram-with-paintbars-for-thinkorswim.1668/#post-24293I had the same issue. Make sure your script matches the same time frame as watchlist. I found some of my watchlist were calculating close and not H/L 2. I believe the backrest showed results of daily with close.
I have personally found good signals using 21/2 on all time frames.
script ConcavityDivergence {
#
# Hull Moving Average Concavity Divergence
# or
# The Second Derivative of the Hull Moving Average
#
# Author: Seth Urion (Mahsume)
# Version: 2020-02-21 Initial Public
#
# This code is licensed (as applicable) under the GPL v3
#
# ----------------------
declare lower;
input price = HL2;
input HMA_length = 34;
input lookback = 2;
def HMA = HullMovingAvg(length = HMA_length, price = price);
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 zero = 0;
zero.SetDefaultColor(Color.GRAY);
zero.SetPaintingStrategy(PaintingStrategy.DASHES);
plot divergence = Displacer(-1, HMA - next_bar);
divergence.SetDefaultColor(Color.LIME);
divergence.SetLineWeight(2);
plot cx_up = if divergence crosses above zero then 0 else Double.NaN;
cx_up.SetPaintingStrategy(PaintingStrategy.POINTS);
cx_up.SetDefaultColor(Color.LIGHT_GREEN);
cx_up.SetLineWeight(4);
plot cx_down = if divergence crosses below zero then 0 else Double.NaN;
cx_down.SetPaintingStrategy(PaintingStrategy.POINTS);
cx_down.SetDefaultColor(Color.RED);
cx_down.SetLineWeight(4);
plot turning_point = if concavity[-1] != concavity then HMA else double.nan;
plot buy = if turning_point and concavity == -1 then low else Double.NaN;
buy.SetDefaultColor(Color.CYAN);
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetLineWeight(3);
}
def signal = ConcavityDivergence("hma length" = 55)."concavity";
def HMA = ConcavityDivergence("hma length" = 55)."HMA";
def next = ConcavityDivergence("hma length" = 55)."next_bar";
#plot buy = signal < 0 and (HMA - next) > (HMA[1] - next[1]);
plot data = Sum("data" =ConcavityDivergence("hma length" = 55)."buy" != Double.NaN, "length" = 10) > 0;
plot signal = ConcavityDivergence("hma length" = 55).divergence crosses above 0 within 10 bars;
Thanks Mashume! I tried as you suggested & was expecting results but I couldn't get single result in the scan. I have commented your original scan condition in this shared version (https://tos.mx/G5Kprzp) & added your sugested line at the end. Can you please run it for yourself & check what could be wrong?
Timeframme is Daily. No extended hours option. If I coment last line & uncomment your original scan script, then scan will give results. However if I switch to last line scan after commenting original scan code, then no result for the same daily timeframe.Check the timeframe you're running the scanner on, and whether you have extended hours turned on or not.
-mashume
Is there anyway this could include a multi-time frame option? So have a 15 minute aggregation of this appear on a 3 minute chart? Thanks in advance.
input HMA_Aggregation = AggregationPeriod.FIFTEEN_MIN;
plot HMA = HullMovingAvg(price = HL2(period = HMA_Aggregation), length = HMA_Length);
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
S | Exponential Hull Moving Average (EHMA) for ThinkorSwim | Indicators | 8 | |
Safe Hull Moving Average Indicator for ThinkorSwim | Indicators | 3 | ||
Hull Format, Label, Watchlist, Scan for ThinkorSwim | Indicators | 115 | ||
L | A Volume Pressure Moving Average For ThinkOrSwim | Indicators | 15 | |
T | Mega Moving Average For ThinkOrSwim | Indicators | 26 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.