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

YungTraderFromMontana

YungTraderFromMontana

Active member
Tested this part out and I notice there is a delay sometimes on this. For example, was watching Eur/USD and the MA_Max printed when the new bar was printed.................. but 5 mins later it vanished, then 10 mins later it appeared again. I was using 1hr chart to test this. Further on, after a new bar was about 40 mins of trading, the MA_Max printed on the prior bar :( .
It may repaint before the candle closes.
 
P

Playstation

Active member
VIP
@amalia Is it possible to remove the agg? I'm trying to use on ticks, wondering if there's a chance to use the inside bar study.
 
T

toopoor88

Member
@toopoor88 try and screen capture if possible. I'm doing testing for ticks. do share.
It appears and vanish sometimes too quick from my slow self to take a pic hehe but I would say best thing is for the creator to go to "On Demand" in the platform and replay 8:20am-8:50am Eur/Usd on a 1hr chart and you will notice it doing it about 2-3 times if I remember. Of course you can't replay tell Tomorrow. Also another one to test is at 8:47-8:48am "/CL" one a one minute chart and you will see that the MA is apperaing and than vanish in the pervious bar due to price changing. Think those two spots will be good for anybody to see for themself.
 
T

toopoor88

Member
Just to make sure everyone understands, my feedback on the indicator is only in reference to switchfire only testing out the MA_max / MA_min of the indicator. It is showing more and more that in some cases if it does print and it stays you will have to wait for 2-3 bars to confirm just to be safe. Which might be way too late. As I am typing this it did it again on "/CL" the 8:51 bar printed, and than the 8:52 bar printed, and soon as the 8:53 bar moved a little more, the 8:51 bar is now showing the signal. I am just saying to be very cautious with this part of the indicator. Also it doesn't matter the time frame or if you are using ticks, this will occur.
 
P

Playstation

Active member
VIP
@toopoor88 i'm manually marking the Max min after bar closes. I will feed back.
but i repeat again, my understanding of repainting indicators is they will not work on mobile. so far been printing really good, although some trades would be a loser.
 
T

toopoor88

Member
@toopoor88 i'm manually marking the Max min after bar closes. I will feed back.
but i repeat again, my understanding of repainting indicators is they will not work on mobile. so far been printing really good, although some trades would be a loser.
I don't use the mobile but wanted to test out your statement today. I loaded up "/ES" put it on 1 min chart and notice at 10:35am that bar was finish printing. No signal was printed but as the 10:36am bar had about roughly 10 secs left before it close the 10:35am now shows the signal. I havent seen it erase anything once printed but there is a chance that it will go back if nothing was printed and place something.
 
P

Playstation

Active member
VIP
try to give the old zoom in zoom out pinch.
the weird thing about tos is if you hold portrait, some signals will be hidden, and then suddenly appear if you zoom out.
it's clearer in landscape mode. i'm still watching /GC. will feed back.
 
T

toopoor88

Member
I changed how it is printed to make sure it's visible and for it to number above or below the bar. So zooming was not the issue. It went back and printed the signal.
 
T

toopoor88

Member
Okay it just erased one. "/ES" at the 11:03am on the 1 min chart, the bar closed and it gave a buy signal, than as the bar was moving and went the other direction on the 11:04 am bar the signal is now gone from the 11:03am bar. The MA part of this regardless if on mobile or pc it will in fact change what it printed on prior bars. Mobile has the same issue.
 
P

Playstation

Active member
VIP
This is weird. So far on mine there's no repaint.
 
P

Playstation

Active member
VIP
@toopoor88 You are right! I spotted 2!! Max appeared after 1 candle closed, but the signal then disappeared as the 2nd following candle is forming. Once it goes against the direction of the Max, the 1st candle Max signal disappeared! However, the HMA lines did not change colour yet.
I think this script needs the 2nd candle to form completely before confirming the 1st Max signal?
Also to add, 7 signals did not repaint and stayed. Only 2 disappeared over the past 6 hours. Eyes are killing me.
@mashume can you confirm?
@YungTraderFromMontana something to take note of.
 
H

HighBredCloud

Active member
VIP
This is likely super basic to most of you expert traders here. But I just wanted to give something back to the community since its been such a great value for me so far. On the 5 min chart, volume average at the default 50 period filters out most of the false signals with this indicator . The two in combination , along with common sense of course, can be a "one stop shop" for all your trading needs. Good luck to all next week.
@technicallydreaming Can you be more clear and state where you're seeing the option to change to 50 period volume average on this indicator...because all I am seeing is HMA length which is set to 21 and look back set to 2. Not seeing where you can even change the volume average. Thanks.
 
technicallydreaming

technicallydreaming

New member
@HighBredCloud I apologize I did not mean to throw anyone off-- volume average is not included here. I was saying I run volume average (included by default in ToS) and use that for confirmation here. If volume is below the 50 period average I hold off on the trade.
 
YungTraderFromMontana

YungTraderFromMontana

Active member
Candle was close.
It depends if you're using the strategy or not. In the strategy the close of the strategy arrow or the arrow after the signal arrow. I've tested it thoroughly.
@toopoor88 You are right! I spotted 2!! Max appeared after 1 candle closed, but the signal then disappeared as the 2nd following candle is forming. Once it goes against the direction of the Max, the 1st candle Max signal disappeared! However, the HMA lines did not change colour yet.
I think this script needs the 2nd candle to form completely before confirming the 1st Max signal?
Also to add, 7 signals did not repaint and stayed. Only 2 disappeared over the past 6 hours. Eyes are killing me.
@mashume can you confirm?
@YungTraderFromMontana something to take note of.
Yes this is what I was trying to say but I think people took it as the close of the first candle, that is not true, to be sure the second candle has to close although I think it is worth trading on the original signal to get a better edge the 80% of the time it doesn't change.
 
D

dreamb0x

New member
VIP
I opted for the ConcavityDivergence code, as it's more compact and has a plot that's more easily accessed for this purpose. Watchlist Column coloured to match the indicator. I think. :)

Code:
script ConcavityDivergence {
#
# Hull Moving Average Concavity Divergence
#  or
# The Second Derivative of the Hull Moving Average
#
# Author: Seth Urion (Mahsume)
# Version: 2020-02-23 V3
# Watchlist Column 2020-03-06 V2
#
# This code is licensed (as applicable) under the GPL v3
#
# ----------------------

declare lower;

input price = HL2;

input HMA_length = 55;
input lookback = 2;

plot 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.LIGHT_GRAY);
zero.setpaintingstrategy(PaintingStrategy.DASHES);

plot divergence = 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 good_momentum = 0.32 * highest(divergence, HMA_Length * 2);
good_momentum.SetPaintingStrategy(PaintingStrategy.LINE);
good_momentum.SetStyle(Curve.SHORT_DASH);
good_momentum.SetDefaultColor(Color.GREEN);

plot bad_momentum = 0.32 * lowest(divergence, HMA_Length * 2);
bad_momentum.SetPaintingStrategy(PaintingStrategy.LINE);
bad_momentum.SetStyle(Curve.SHORT_DASH);
bad_momentum.SetDefaultColor(Color.RED);


}
plot data = ConcavityDivergence().divergence;
def HMA = ConcavityDivergence().HMA;

data.AssignValueColor(if  data > data[1] then Color.BLACK else Color.WHITE);
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);

hmm i just tried this code but i think there's something wrong, nothing is showing up.
 
P

Playstation

Active member
VIP
this is weird, the alert don't work on max and min. anyone can verify?
And btw, on mobile will also repaint.
 
Last edited:

Top