This indicator is a dedication to the work of @RobInTheBlack (Twitter Handle) who has helped countless traders with this pure price action based strategy that he developed over the past 27 years of trading, It is called #TheStrat
This indicator can plot the 4 different Price Action based reversals (along with their entries) as discussed here: https://www.newtraderu.com/2019/02/13/what-do-we-know-to-be-true-about-price-action/
I recommend importing the .ITF in order to load the variables, but for those interested here is the code:
InsideBar = high < high[1]-tollerance*pointsize and low > low[1]+tollerance*pointsize
OutsideBar = high > high[1]+tollerance*pointsize and low < low[1]-tollerance*pointsize
TwoUp = high > high[1]+tollerance*pointsize and low > low[1]+tollerance*pointsize
TwoDown = low < low[1]-tollerance*pointsize and high < high[1]-tollerance*pointsize
Up = close > open+tollerance*pointsize
Down = close < Open-tollerance*pointsize
If TwoOneTwo = 1 Then
If EarlyDetection = 1 Then
If TwoUp[2] and Up[2] and InsideBar[1] Then
drawtext("↑2-1-2↓?",barindex,highest[2](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,low[1]-tollerance*pointsize,barindex+ExtendLines,low[1]-tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-1,high[1]+tollerance*pointsize,barindex+ExtendLines*2,high[1]+tollerance*pointsize)coloured(255,0,0)
EndIf
ElsIf TwoDown[2] and Down[2] and InsideBar[1] Then
drawtext("↓2-1-2↑?",barindex,lowest[2](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,high[1]+tollerance*pointsize,barindex+ExtendLines,high[1]+tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-1,low[1]-tollerance*pointsize,barindex+ExtendLines*2,low[1]-tollerance*pointsize)coloured(255,0,0)
EndIf
EndIf
Else
If TwoUp[2] and Up[2] and InsideBar[1] and TwoDown and Down Then
drawtext("↑2-1-2↓",barindex-1,highest[3](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-2,low[1]-tollerance*pointsize,barindex+ExtendLines,low[1]-tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-2,high[1]+tollerance*pointsize,barindex+ExtendLines*2,high[1]+tollerance*pointsize)coloured(255,0,0)
EndIf
ElsIf TwoDown[2] and Down[2] and InsideBar[1] and TwoUp and Up Then
drawtext("↓2-1-2↑",barindex-1,lowest[3](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-2,high[1]+tollerance*pointsize,barindex+ExtendLines,high[1]+tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-2,low[1]-tollerance*pointsize,barindex+ExtendLines*2,low[1]-tollerance*pointsize)coloured(255,0,0)
EndIf
EndIf
EndIf
EndIf
If TwoTwo = 1 Then
If TwoUp[1] and TwoDown Then
drawtext("↑2-2↓",barindex,highest[3](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,lowest[2](low),barindex+ExtendLines,lowest[2](low))
EndIf
ElsIf TwoDown[1] and TwoUp Then
drawtext("↓2-2↑",barindex,lowest[3](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,highest[2](high),barindex+ExtendLines,highest[2](high))
EndIf
EndIf
EndIf
If TwoThree = 1 Then
If TwoUp[1] and OutsideBar and Down Then
drawtext("↑2-3↓",barindex,highest[3](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,lowest[2](low),barindex+ExtendLines,lowest[2](low))
EndIf
ElsIf TwoDown[1] and OutsideBar and Up Then
drawtext("↓2-3↑",barindex,lowest[3](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,highest[2](high),barindex+ExtendLines,highest[2](high))
EndIf
EndIf
EndIf
If ThreeOneTwo = 1 Then
If EarlyDetection = 1 Then
If OutsideBar[2] and Up[2] and InsideBar[1] Then
drawtext("↑3-1-2↓?",barindex-1,highest[3](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,low[1]-tollerance*pointsize,barindex+ExtendLines,low[1]-tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-1,high[1]+tollerance*pointsize,barindex+ExtendLines*2,high[1]+tollerance*pointsize)coloured(255,0,0)
EndIf
ElsIf OutsideBar[2] and Down[2] and InsideBar[1] Then
drawtext("↓3-1-2↑?",barindex-1,lowest[3](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-1,high[1]+tollerance*pointsize,barindex+ExtendLines,high[1]+tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-1,low[1]-tollerance*pointsize,barindex+ExtendLines*2,low[1]-tollerance*pointsize)coloured(255,0,0)
EndIf
EndIf
Else
If OutsideBar[2] and Up[2] and InsideBar[1] and TwoDown and Down Then
drawtext("↑3-1-2↓",barindex-1,highest[3](high)+spacing*pointsize,dialog,standard,12) coloured(255,0,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-2,low[1]-tollerance*pointsize,barindex+ExtendLines,low[1]-tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-2,high[1]+tollerance*pointsize,barindex+ExtendLines*2,high[1]+tollerance*pointsize)coloured(255,0,0)
EndIf
ElsIf OutsideBar[2] and Down[2] and InsideBar[1] and TwoUp and Up Then
drawtext("↓3-1-2↑",barindex-1,lowest[3](low)-spacing*pointsize,dialog,standard,12) coloured(0,255,0)
If DrawBreakoutLine = 1 Then
drawsegment(barindex-2,high[1]+tollerance*pointsize,barindex+ExtendLines,high[1]+tollerance*pointsize)coloured(0,0,255)
drawsegment(barindex-2,low[1]-tollerance*pointsize,barindex+ExtendLines*2,low[1]-tollerance*pointsize)coloured(255,0,0)
EndIf
EndIf
EndIf
EndIf
Return