TradingView
modhelius
6 פבר׳ 2024 17:53

HTF Candle Projections 

E-mini Nasdaq-100 FuturesCME

תיאור

The HTF Candle Projections indicator shows a number of candles from a higher time frame (HTF) projected to the right of the candles in the current timeframe. This can be very useful if you want to analyze two different timeframes without the need to switching between the different timeframes.

This indicator is highly inspired by the HTF Power of Three indicator by @toodegrees but is fully free and open source, it also have support for showing more than just one candle in the projection. It is also inspired by the HTF Candle Insights (Expo) indicator by @Zeiierman but differ in the way that it update the HTF candles in real time and also have support for showing Open/High/Low projections that also updates in real time.

This indicator is released under TradingViews default license (Mozilla Public License 2.0)

הערות שחרור

Fix: Minor fix in the grouping of the settings.
Update: Remove upper limit for how many HTF candles that can be shown.

הערות שחרור

Update: Add support for automatically setting timeframe based on current timeframe.

הערות שחרור

Fix: Use higher timeframe data rather than current timeframe data.

הערות שחרור

Update: Change back so the default behavior is to generate HTF candles from the current timeframes data, since it is both faster and more accurate, except from the Weekly chart that currently always uses HTF data to render candles since candles on higher timeframes can close in the middle o a week. This means that the Weekly timeframe does not work very well with bar replay.
New: New setting "Always use HTF data to generate candles" added. This setting can for example be used if you use intraday data with pre market data, but want to project candles based on non intraday candles not using pre market data.

הערות שחרור

Update: Improved the way the OHC projections is plotted to work better with the weekly chart.

הערות שחרור

Update: Support for OHLC price labels added.

הערות שחרור

Fix: A bug that resulted in that projections where not removed if only one candle was set to be generated.
Update: Fix even more fine granular auto time frame selection.

הערות שחרור

Update: "Use HTF data to generate candles on Weekly timeframe" setting added.
Fix: Fixed a bug in OHL projection.

הערות שחרור

Update: Size and Margin settings added.

הערות שחרור

Update: New display picture.

הערות שחרור

Update: Fix so auto selection of timeframes can either be done in one or two levels.

הערות שחרור

Update: Support for Heikin Ashi candles.
Fix: Spelling errors

הערות שחרור

Fix: Do not calculate Hekin Ashi if chart already is Heikin Ashi

הערות שחרור

Update: A bit nicer settings.
תגובות
vitarada21
Great job, I love this indicator!
mavleds
Great Work! Could you add a text signature about TF on candles?
Aliaksandr_Rusko
Greetings! Thanks for the indicator! Tell me how to set the opening time of the daily candle to midnight? Now the indicator draws the opening at 21:00 of the previous day (UTC -5).
modhelius
@Aliaksandr_Rusko, This indicator uses the data from TradingView (in other words the current exchange) without modifications. So, in the lower corner of the graph, press UTC-5 and instead chose Exchange in the list.
TMK2
Hi, @modhelius.

Thanks for sharing this.

This is actually really well done! Congratulations!

3 points, if I may:
1. Using this on a weekly TF, trying to project Quarterly candles and it doesn’t seem to be plotting them correctly.
2. Unlike your chart above, on mine, on the Weekly timeframe, the trace lines that connect to the exact OHLC don’t quite line up to the precise point like with above.
3. Would you be able to add price labels to the candles and their respective points as well?

Hope you can assist.

Thanks.
modhelius
@TMK2, Thank you for your feedback!

Answer to 1. and 2.: Yes, I actually noticed that my self just after I published my script. In my first version that I published I used the current lower timeframes data to generate the higher timeframe candles but noticed that for instruments that uses for example pre market data for intraday but does not use pre market data for daily and above my candles generated then actually differened from the actual candles on the higher timeframe. I therefor changed so the indicator instead uses the HTF data to generate the candles on the lower timeframe, but that instead resulted in that the current bar in real time does not follow the lower timeframe correctly, and that the OHLC no longer is plotted exactly on the point above where they happens. So I probably need to rewrite the script so it uses the current timeframe to generate the current bar, but then uses the higher timeframe data as soon as the bar is finished. It will probably be a bit of work, but hopefully that will solve the problems you mention.
Answer to 3.: That is probably not very hard, will take a look at it as soon as I have fixed the problems above.

Thanks!
modhelius
@TMK2, I also just noticed that for months/quarters that closes in the middle of the week it will be very hard to render the correct monthly/quarterly candle on the weekly graph without either using the higher timeframe data which will result in the problems above, or by instead using the daily data for the current bar which might result in other problems. Let me investigate if I can solve this in a graceful way. In worst case I need to do the weekly timeframe as a special case that might continue suffer from the OHLC problem. Btw, what instrument are you looking at when you get the problem?
TMK2
@modhelius, glad to share.

I was on the NVDA Weekly TF chart (trying to then project the Quarterly candles).

Feel free to pick my brain on anything, and I’d be glad to check for bugs etc and give feedback if and when you’d like.

Thanks again.
modhelius
@TMK2, Ok, I have now published a new version where I try to do a workaround for the weekly timeframe so it shall work a little bit better. It hopefully will work in most situations but I can still result in problems (especially if you try to use the indicator in Bar Reply mode on the weekly timeframe, and the OHLC projections can maybe also generate wrongly on weeks when a new month start in the middle of the week). I have a few ideas how to further improve this though so it shall work better on the weekly timeframe, but for now, please try the new version and see if that solves most of your problems ;)
TMK2
@modhelius, just checked it out again.

It’s looking good. The candles are definitely plotting correctly now. The trace lines are still not plotting all the way to the exact candle and point, but they are on the right price line, and that’s good. They now all plot from the projection to the last current candle on the TF I am using.

Massive improvement and this has solved the issue with accurate plotting.

Thanks!

Looking forward to seeing what else you come up with.
עוד