Hull Moving Average Turning Points and Concavity (2nd Derivatives)

F

fjr1300

Member
VIP
@mashume I used the updated Hull Turning Points together with other tools. As a group, they provided awesome guidance allowing me to take $43 handles on ES. I left plenty of money on the table since I had to go. But it works and it does an awesome job. You are the man. Thank you very much for sharing. Here is a link to a couple of today's charts and a list of indicators used to enter and exit the trade.
I will share later the studies link from TOS. I am out of the office now.
 
T

tradegeek

Member
2019 Donor
Yes. I now understand. Sorry. I am out of the office now but will share all the studies that I am able to. There are a couple that I not allowed to share due to licensing restrictions.
@fjr1300 Thanks! If you can't share, maybe you can reference where you got it from. My SwingArm Study looks interesting. I think that's what it is.
 
F

fjr1300

Member
VIP
I just thought it would be easier for someone graciously to share a chart with the studies than for other members to search around for all the studies. Just a thought. Nice trade by the way!
Good morning. Here is the link to the TOS Set of Studies. The two lower studies can be combined if space is needed. I have 4 monitors and do have basic setups to complex setups for ease of reading the charts.

The SwingArm is an idea I had using the ATRTrailingStop and modifying it to have FIB Retracements into it. I hired a code to do the work for me.
https://tos.mx/jhDv0Pt

@BenTen The SwingArm (ATRTrailingStop with Fib Retracement Levels) could be a new thread. What do you think?

I forgot to mention, I have two other studies that I have the I do not remember where I got them. Over the years, I have spent a fortune buying stuff and some of it does not have information as to where I got it from. DynamicHidingPivots and ChrisAutoTrendlines.

I have added a couple of charts to the google photos album with some highlights. Feel free to contact me if you have any questions. Glad to help out.

I post most of my charts to Twitter. Also, I post the basis of my trading on my website. (all free) Not interested in subscription selling, etc. It is like the journal of my learning process.
 
Last edited by a moderator:
T

tradegeek

Member
2019 Donor
@fjr1300 Nice, thank you!

For anyone who is interested. The ChrisAutoTrendlines you've mentioned can be found here...

Here is another auto-trend line script...
 
BenTen

BenTen

Administrative
Staff
VIP
@fjr1300 Sure, if you want to make it a new thread for the indicator then feel free.
 
B

Berezowsky

New member
Hi Mashume!!! Great indicator! Is there a way you could help us with the WL in order to change the numbers to a buy and sell text as soon as the buy and sell signal appears.
After
AssignBackgroundColor(if data >= 0 then if HMA > HMA[1] then Color.GREEN else Color.DARK_GREEN else if HMA > HMA[1] then color.DARK_ORANGE else color.DARK_RED);

ADDLABEL ..... I have been trying but getting errors

Thanks in advanced
 
J

jay2

New member
@NikeNewl I am too having this problem. Do you just add this to the custom of the Scan?

 
Last edited by a moderator:
M

mashume

Active member
VIP
@jay2, @Berezowsky,
When you imported the study, either by link or by copy and paste, if you didn't name it exactly "Concavity" there will be a problem. If you did name it that, I'm not sure, because it works on my machine this way.

-mashume
 
B

Berezowsky

New member
@mashume @jay2
The code that is working for me right now is the following and I would only like to paint the background color green or red as to buy or sell

Code:
input price = HL2;
input HMA_Length = 20;
input lookback = 2;

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 double.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 Double.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 Double.Nan;
MA_Min.SetDefaultColor(Color.WHITE);
MA_Min.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
MA_Min.SetLineWeight(3);

plot sell = if turning_point and concavity == -1 then high else double.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 double.nan;
buy.SetDefaultColor(Color.CYAN);
buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
buy.SetLineWeight(3);

def divergence = HMA - next_bar;

addLabel(yes,
    if buy then "buy"
    else if sell then "sell"
    else  "-");
I'm trying to add the following but does not paint the background

assignbackgroundcolor(
if Buy is true then color.GREEN
else if sell is true then color.red
else color.black);
 
Last edited by a moderator:
C

Craighaber71

Member
2019 Donor
Warehouse
VIP
Hey guys what is the best setting for daily chart...Just trying to fine tune this thing
 
S

stockfella

New member
Out of the 14 trades tonight on the S&P 500 futures, 11 wins 2 losses and 1 breakeven. Largest winner $300 and largest loser was $112.50. I should have done better because I missed a 10+ point run up when I stepped away to do something and I didn’t trail my trade properly and gotten out of many of them a bit too soon.

I use the Swing Hi Swing Lo indicator to let me know potential swing points. I use turning points on HMA Concavity Divergence for confirmation. Aggressive entry would be when the turning point appears. Conservative entry would be at the close of the bar with the turning point(signal bar), 50% of the turning point bar, or any price within the acceptable risk parameters. Stop would be a tick or two from the high/low of swing point or the signal bar depending on where my entry is or 8 ticks from my entry.

Since there can be many inflection points on smaller time frame as someone mentioned, I use a trailing stop and once I’m in the trade I should not care about other inflection points after that until I hit my target or my stop takes me out. Once out of the trade, wait for the next swing point and entry.

I’m having such great success with this that I’m getting this automated in Ninjatrader 8.

By the way, same concept can be use with the Ultimate Breakout Indicator for stops and targets.
@tradegeek, curious if you would post a screenshot with an example of the scalping method you mentioned, I ask because I am setting my renko chart for futs and or stocks, like TSLA, have to change my ticks for each but curious on your ES set up you mentioned earlier in thread if you could show sample of how you use confirmation candle, I have an OCO bracket with a hard stop for stocks, but looking at trailing instead and setting it for futs or stocks, thanks for any help
 
Last edited:
C

Craighaber71

Member
2019 Donor
Warehouse
VIP
@tradegeek, curious if you would post a screenshot with an example of the scalping method you mentioned, I ask because I am setting my renko chart for futs and or stocks, like TSLA, have to change my ticks for each but curious on your ES set up you mentioned earlier in thread if you could show sample of how you use confirmation candle, I have an OCO bracket with a hard stop for stocks, but looking at trailing instead and setting it for futs or stocks, thanks for any help
What setting are you using
 
B

Berezowsky

New member
@mashume @BenTen

I have been working on this code for the WL with signals on Buy, Sell, TOP and Bottom.... I just got a single signal to color the background, but still missing 3 more signals to color the background. I hope you might be able to help.

Code:
input price = HL2;
input HMA_Length = 20;
input lookback = 2;

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 double.nan;

#Hull Line

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 Points

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

#MAX and MIN points

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

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

#Buy and Sell Entry Price points, caution, not exact

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);

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

addLabel(yes,
    if buy then "buy"
    else if sell then "sell"
    else if MA_min[1] then "Buy Bottom"
    else if MA_Max[1] then "Sell top"
    else  "-");

assignbackgroundcolor(
    if Buy[1] then color.dark_GREEN
    else if sell[1] then color.dark_red
    else if MA_Min then color.green
    else if MA_Max then color.red
    else color.black);
 
Last edited by a moderator:
madeinnyc

madeinnyc

Member
@mashume , I've been trying to keep-up with this thread for changes in the code. Can you please confirm if Version: 2020-02-23 V3 for the lower study is the most current version. Thanks in advance!
 
M

mashume

Active member
VIP
@mashume , I've been trying to keep-up with this thread for changes in the code. Can you please confirm if Version: 2020-02-23 V3 for the lower study is the most current version. Thanks in advance!
You are correct, sir... probably. :) There are some developments I've tried but nothing that was of quality to release into the wild as yet.
-mashume
 

Top