// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © trademate2000 //@version=4 study("OGT Price Action Indicator", overlay = true) showengulf = input(defval = true, title = "Show Engulfing", group = "engulf") showdoji = input(defval = true, title = "Show Doji", group = "doji") candles = input(defval = 5, minval = 1, title = "Check no. of candles", group = "engulf") minper = input(defval = 70,minval = 1, title = "Min %age of engulfing candle body", group = "engulf")/100 range = high-low minpercond = abs(close-open) > (range*minper) bullengulf = high>high[1] and lowopen and open[1]>close[1] and range==highest(range,candles) and minpercond bearengulf = high>high[1] and lowopen ? high-close : high-open lowwick = close>open ? open-low : close-low body = close>open ? close-open : open-close maxwick = max(highwick,lowwick) fourpricedoji = currentbodyperopen and body