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

Repaints
Status
Not open for further replies.
I just wanted to give a fair warning that the indicator is roughly 1-2 bars behind when it produces some of its signals. So what you see in the report will be off. For example, was just watching a Futures contract on a 15 min chart for kicks and giggles, and when the signal appeared to buy, it was 2 bars ago making it almost impossible to enter any trades when it says too. Tested it again on Eur/Usd and other stocks using OnDemand. It's still not bad from what I am seeing but if the market is choppy you might get hurt really bad.

@toopoor88 thank you for note. What signals you mean?
 
The arrows, I haven't tested the new one but the first edition was printing arrows way after the direction and making it look beyond good and impossible to get in at that time unless you have a time machine.

@toopoor88

how about the coloring of the HMA trend? being delayed?

and is the formation of the candle or bar delayed too? being above or below the trend delayed?

sorry but wanting to know the delaying signals!
 
Thats something you have to ask the person that created this and for you to test out his updated version. From what I read he/she still plans to improve upon it and I will just wait until its fixed more before I look at it again.
 
Well, first off, thank you all for your continued interest.

Do understand that, like I would guess is true for many of you, thinkorswim is hardly my full time job... :)

I'm still working through a good method of damping the response of the concavity flip that won't introduce additional delay in signals. It's not an easy task given the purely mathematical start to life this indicator had. The basic premise I used to find the 'turning points' is this:

1. calculate the slope of a straight line between the value n bars ago and the previous bar
2. project a line on that slope from the previous bar
3. compare the value of the current bar HMA to the projected value
4. if the value from step 3 is negative, and the value from step 3 last time around was negative, there is no change of concavity. Otherwise, it has changed and a signal is generated.

The idea of damping is to allow some play in step 3 such that trivial flips won't generate a signal. I'm not sure yet what form than damping takes. If anyone has suggestions I'll be open to ideas. Some things I've been playing with:
a. a percent difference based on
i. absolute percents
ii. some sort of percent based on recent movement of either the indicator or price
iii. some other thing ATR?
b. an absolute value that the user can enter
c. a quadratic projection rather than linear (which would require more computation, but perhaps be better since it would look at changes in curvature rather than deviance from a straight line (think of this as the dx part in calculus -- as dx -> 0 we have a derivative)

As always, much of my interest in this stems from the mathematics involved, and it is up to interpretation to decide on the viability as an indicator for your system. I think I was originally looking for a confirmation signal for some other indicator when I created this rather than a primary or independent indicator.

@tem2005, there is always some delay because it relies on the current bar to show changes in concavity of the Moving Average curve. It can be minimized by using prices that do not rely on 'close' since those have to wait for the bar to end before calculation can occur, and so the nearest curve point that can be analyzed is at least one bar past. Though the coloured bar at the top that talks about divergence is coded to try to provide some indication that a concavity change may occur soon. It's based on the divergence (difference between projected slope and HMA value) approaching 0. Crossovers of that slope are the turning points.

Happy Trading
-Mashume
 
@mashume Thank you so much for all the effort

I am using HMA length 150 and it looks good on chart, but I was not able to get the scanner work, is there a link I can use to import the scanner
 
Well, first off, thank you all for your continued interest.

Do understand that, like I would guess is true for many of you, thinkorswim is hardly my full time job... :)

I'm still working through a good method of damping the response of the concavity flip that won't introduce additional delay in signals. It's not an easy task given the purely mathematical start to life this indicator had. The basic premise I used to find the 'turning points' is this:

1. calculate the slope of a straight line between the value n bars ago and the previous bar
2. project a line on that slope from the previous bar
3. compare the value of the current bar HMA to the projected value
4. if the value from step 3 is negative, and the value from step 3 last time around was negative, there is no change of concavity. Otherwise, it has changed and a signal is generated.

The idea of damping is to allow some play in step 3 such that trivial flips won't generate a signal. I'm not sure yet what form than damping takes. If anyone has suggestions I'll be open to ideas. Some things I've been playing with:
a. a percent difference based on
i. absolute percents
ii. some sort of percent based on recent movement of either the indicator or price
iii. some other thing ATR?
b. an absolute value that the user can enter
c. a quadratic projection rather than linear (which would require more computation, but perhaps be better since it would look at changes in curvature rather than deviance from a straight line (think of this as the dx part in calculus -- as dx -> 0 we have a derivative)

As always, much of my interest in this stems from the mathematics involved, and it is up to interpretation to decide on the viability as an indicator for your system. I think I was originally looking for a confirmation signal for some other indicator when I created this rather than a primary or independent indicator.

@tem2005, there is always some delay because it relies on the current bar to show changes in concavity of the Moving Average curve. It can be minimized by using prices that do not rely on 'close' since those have to wait for the bar to end before calculation can occur, and so the nearest curve point that can be analyzed is at least one bar past. Though the coloured bar at the top that talks about divergence is coded to try to provide some indication that a concavity change may occur soon. It's based on the divergence (difference between projected slope and HMA value) approaching 0. Crossovers of that slope are the turning points.

Happy Trading
-Mashume
thank you for your contributions - have you considered using the HL2 price as a benchmark rather than the close to see if you can speed it up?
 
Ya'll quit giving yourselves headaches. Just use the ones in testing that give the best result, Exponential hull moving average or the Triple exponential moving average. 🙈;)

@horserider Do you have better results by inserting the TEMA into the original code or the "faster" version? I seem to be getting a lot of signals with the TEMA but, then again, I'm not proficient at ThinkScript so I may have coded it wrong. Do you mind sharing your TEMA and EHMA versions?

@mashume Thank you so much for your work with this code/concept! It's great.
 
This is wonderfully amazing, and yet too good to be true.
I was comparing between Close and HL2, and find that Close's signal is faster? Even if it does lag behind 1 bar, it's okay as long as the trader is prudent with other signals.
 
still struggling using tick or time charts, 1000 2000 ticks or 3, 5, 15 mins. . once it works well, next day not. we need something to confirm signals instead of too many signals
 
Here is how I’m using it .1 minute charts although I know thats risky. I took off all buy / sell arrows / turning points / min max ema . I like the chart to be less complicated. I buy when up trending candles are above the forest green color ( confirming with my usual process ,which is minimal tbh). Contrary to the instruction I do not usually Sell at the Orange phase I sell at the red.
 
Yes this borders on predicative algo I think.
But the chop in US timing is really bad, need other supports to prove the right signals, something like 200MA to confirm trend before going in concavity up or down signals. I salute you @mashume You a mathematician? Professor X?

Mathematician? Sort of. I studied Physics and was once a teacher of same. These days I make data play well together.

Glad you all are enjoying this one.

-mashume
 
Status
Not open for further replies.

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
368 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top