This indicator finds trend following engulfings, and draws order blocks based on the 1st candle’s range (the first candle of the engulfing pattern). It does filter the trend with simple moving averages of 21 and 55 periods, but it doesn’t filter for retracements in the trend (you should consider only the order blocks that are coming from engulfings after a retracement).
Converted upon a request from https://www.prorealcode.com/topic/traduzione-codice-tw-order-block/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
// Auto Order Block by D. Brigaglia // // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © dadoesploso // // This indicator finds trend following engulfings, and draws order blocks based on the 1st candle's // range (the first candle of the engulfing pattern). // It does filter the trend with simple moving averages of 21 and 55 periods, but it doesn't filter // for retracements in the trend (you should consider only the order blocks that are coming from // engulfings after a retracement) // ONCE atrc = 0.9 ONCE atrct = 1.0 ONCE length = 350 Atr10 = AverageTrueRange[10](close) // IF ((open[1] - close[1]) > (atrc * atr10)) AND ((close - open) > (atrct * (open[1] - close[1]))) THEN DrawRectangle(BarIndex[1],open[1],BarIndex + length,lowest[1](low)) coloured("Blue",255) ENDIF // IF ((close[1] - open[1]) > (atrc * atr10)) AND ((open - close) > (atrct * (close[1] - open[1]))) THEN DrawRectangle(BarIndex[1],highest[1](high),BarIndex + length,open[1]) coloured("Red",255) ENDIF // RETURN |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials