TradingView
fadizeidan
4 Apr 2023 pukul 20.54

ICT HTF Candles (fadi) 

Micro E-mini S&P 500 Index FuturesCME

Deskripsi

Plotting a configurable higher timeframe on current chart's timeframe helps visualize price movement without changing timeframes. It also plots FVG and Volume Imbalance on the higher timeframe for easier visualization.

With ICT concepts, we usually wait for HTF break of structure and then find an entry on a lower timeframe. With this indicator, we can set it to the HTF and watch the develop of price action until the break of structure happens. We can then take an entry on the current timeframe.

Settings
HTF Higher timeframe to plot
Number of candles to display The number of higher timeframe candles to display to the right of current price action
Body/Border/Wick The candle colors for the body, border, and wick
Padding from current candles The distance from current timeframe's candles
Space between candles Increase / decrease the candle spacing
Candle width The size of the candles

Imbalance
Fair Value Gap Show / Hide FVG on the higher timeframe
Volume Imbalance Show / Hide Volume Imbalance on the higher timeframe

Trace
Trace lines Extend the OHLC lines of the higher timeframe and the source of each
Label Show/Hide the price levels of the OHLC

Catatan Rilis

Fixed label display under settings

Catatan Rilis

Fixed Trace show/hide not working

Catatan Rilis

Fixed the current price label

Catatan Rilis

Major Update:
- Now supports up to 6 HTF candle sets
- Control over spacing between the candle sets
- Control over the trace and label lines per candle set
- Label above each candle set to identify it

Known Issue:
when using very large timeframe on small timeframe, showing tracelines may cause the indicator to error. This is due to limitation in how many bar backs is available on the smaller timeframe and Tradingview cannot find that starting point. The workaround is to hide trace lines on larger timeframes

Catatan Rilis

internal code cleanup

Catatan Rilis

Update:
- Added possible range option based on ATR calculation. Indicator will highlight both possible possible bullish and bearish ranges based on the average of previous X (configurable) candles. This gives an indication of possible up OR down range. Once range has been met, the highlighted range will be removed. Only first 3 ranges are shown by default since much higher timeframes will have very large ranges and can distort charts with Auto fit.

Catatan Rilis

UPDATE:
ROLLBACK of range due to performance issues. Calling request.security is causing performance issues.

Catatan Rilis

UPDATE:
Fixed an issue with candles not rendering when market is closed

Catatan Rilis

Clarification: There are two ways of displaying higher timeframe candles, by programmatically calculating it based on current timeframe, or by using request.security.

- Programmatically calculating provides real time update, however it does not work well for partials. for example, when the chart is on 3m, it fails to calculate 5m correctly. instead, it will calculate 6m. that is because the minimum of candles needed to calculate 5m will be two 3m candles.
- request.security is the preferred approach, however it is extremely slow and would not show live updated candles and that will result with price updating few seconds later, which would render this indicator useless

The approach I have taken is that if selected timeframe cannot be calculated based on the chart timeframe, then the timeframe will be hidden/ignored

Known bug: Monday on daily will be off because lower timeframe calculation includes Sunday, where on daily timeframe it is ignored

Catatan Rilis

Bug Fix:
1. When mitigated FVGs were hidden, they were still counted resulting in fewer FVGs being displaced.
2. The previous bug fix resulted in FVGs' right padding not calculating correctly.

Catatan Rilis

Rollback incorrect checkin

Catatan Rilis

UPDATE: Code is published under a new indicator with the same name

Catatan Rilis

FIX: Fix for wick colors when candle changes from bullish to bearish and vice versa

Catatan Rilis

Major Update:
- Refactored the code and cleaned it up
- Added Limit to next HTFs only setting that allows you to only display next 3 HTF candles for example
- Added Remaining Time label per request
- FVGs and V.I. now show on developing candles
- Changed how Trace lines work. Now they can be anchored to first or last set of HTF candles
Komentar
LNB_CRYPTO
is there any chance may i have this script ty, ill send a coins, pls dm me
fadizeidan
@LNB_CRYPTO, I am sharing what I make for myself, not doing it for coins. My plan was to share the code once I clean it up since I am new to Pine script, but apparently you cannot change it from protected to public once published. I will either share the code to publish it again as new indicator once I refactor the code.
cashnico
@fadizeidan, Would you mind sharing a pastebin of it's current state? It'd be nice to play around with the code.
fadizeidan
@cashnico, sorry forgot to reply, I shared the code as another script
TMK2
@fadizeidan, hi!

Just wanted to say that this script is good! It’s really, really good. Looking forward to seeing what more you may do with it. Recently found it and I like it, a lot.

Thank you for sharing. As @LNB_CRYPTO said, if you do decide to eventually share the code with us, we would be immensely grateful. Thank you!
TMK2
@fadizeidan - I don’t know if it’s me, or if it’s the indicator by design, but it can only show candle sets for one HTF at a time. I.e, on a daily chart, it won’t show HTF candle sets for both the weekly and monthly time frame at the same time.

Speaking of this, on a daily chart, the highest HTF it will allow me to display is Weekly candles, and nothing higher than that.

Thoughts?
fadizeidan
@TMK2, no it is not you. I was trying to solve an issue and introduced another.

Because I am calculating the HTF candles based on current timeframe, Tradingview doesn’t give me 5m data on 3 m chart without using request.security. The problem is that command takes a second or two to return the data.

I have two choices, not provide live data, or only show candles that are divisible by current timeframe. I added logic to only show HTF divisible by current timeframe but I did not check the daily.

I will see if I can fix daily+ timeframes, but I need a solution for intraday still.
TMK2
@fadizeidan, noted.

Thanks for the prompt reply and very concise explanation.
fadizeidan
@TMK2, fixed in latest update
TMK2
@fadizeidan, hello!

Looks great! Thanks.
Lebih lanjut