#// Created by Cristian.D - from Secrets of a Pivot Boss - Frank Ochoa
#study(title="OutsideReversal", shorttitle="OReversal", overlay=true)
# Converted by Sam4COK @ Samer800 - 08/2022 -
#Request from https://usethinkscript.com/ memeber
def ReversalLong = low < low[1] and close > high[1] and open < close[1];
def ReversalShort = high > high[1] and close < low[1] and open > open[1];
#// Bar Colors and signals
AddChartBubble(ReversalLong, low, "BUY", Color.GREEN, no);
AddChartBubble(ReversalShort, high, "SELL", Color.RED, yes);
AssignPriceColor(if ReversalLong then Color.BLUE else if ReversalShort then Color.WHITE else Color.CURRENT);