OPEN-SOURCE SCRIPT

Order blocks

업데이트됨
Hi all!

This indicator will show you found order blocks that can be used as supply or demand. It's my take on trying to create good order blocks and I hope it makes sense.

First off I suggest to verify the current trend before using an order block. This can be done in a variety of ways, one way could be to use my other script "Market structure" (tradingview.com/script/ud6AQSm2-Market-structure/) which I use and suggest.

You can configure the indicator to behave differently depending on settings. These are the settings available:

• The order blocks created can be found in any higher timeframe defined in "Timeframe"
• The number of active order blocks are defined in "Count". If an order block is found the earliest order block will be replaced
• You can choose the type of order blocks that are found ("Bullish", "Bearish " or "Both") in "Type"
• The old order blocks can be kept if "Keep history" is checked
• Order blocks that are found are not removed when mitigated (entered) but when a new one appears. They can be removed when they are broken by price if "Remove broken zones" are checked

There is also a setting section called "Requirements" that defines what is required for an order block to be created. These are the settings:

• "Take out"
Check this if you want the base of the order block (the candle where the zone is drawn from (high and low)) to have to take out the previous candle (be higher or lower depending if the order block is bullish or bearish).
• "Consecutive rising/falling"
Each following candle in the reaction (the 3 reaction candles) needs to reach higher or lower (depending on bullish or bearish). Check this if you want that to be true.
• "Reaction"
Some sort of reaction is needed from the 3 candles creating the order block. This reaction is based on the value of the Average True Length (ATR) of length 14. You can here define a factor of the value from the ATR that these 3 candles needs to move in price. A higher need for a reaction (higher factor of the ATR) will create lesser zones. You can also choose to show this limit with the checkbox.
• "Fair Value Gap"
The reaction needs to create a gap (imbalance) in price. This gap is known as a "Fair Value Gap" and is created when the last candle's wick does not meet with the base candle's wick. Check this if you want this to be needed.

After these settings you can also choose the colors of the created zones. The ones that are active (called "Zones"), the ones that are replaced ("Replaced zones") and the ones that are broken ("Broken zones") (if this is enabled in "Remove broken zones").

I'm using my library "Touched" to be able to show you labels when the order blocks have a retest, false breakout and breakout. These labels can be hidden if you disable the labels under the style tab in the indicator settings.

The concept of order blocks is widely used among traders and can provide you with good supply or demand zones. I hope that this indicator makes sense.

My todo-list has a few things, but top of that list is adding alerts for zone interactions or creations. Please feel free to say what you want to be coded!

The order blocks in the publication chart are found in weekly timeframe but are shown on the daily timeframe. Other than that the image shows you zones from the default settings (which are based on the daily timeframe).

Best of luck trading!
릴리즈 노트
- Use my new "OrderBlocks" library (tradingview.com/script/PH0EAO9s-OrderBlocks/)
- Fix spelling error
릴리즈 노트
- Code is now moved to my library 'OrderBlocks' (tradingview.com/script/PH0EAO9s-OrderBlocks/) which makes this indicator code very sparse
릴리즈 노트
- Now supports lower timeframes! You can set the timeframe lower then the chart and it use 'request.security_lower_tf'. This is possible since TradingView released Pine Script version 6 and request functions can now be used in local scopes. So the indicator will use 'request.security' or 'request.security_lower_tf' depending on if the configured timeframe is higher or lower than the chart's. If a lower timeframe than the chart is chosen you must select between "First" and "Last" to take a zoom in the chart's candle.
- Bumped Pine Script version to 6
orderblocksupplanddemandSupport and Resistance

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항