This indicator follows on the previous #TheStrat indicators which compliment 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 will number the different candle types as mentioned here: https://www.newtraderu.com/2019/02/13/what-do-we-know-to-be-true-about-price-action/
The Moving Average period in the configuration is used to determine which side of the candle the 1 and 3 candles are displayed.
I recommend importing the .ITF in order to load the variables, but for those interested here is the code:
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 26 27 28 29 30 31 32 |
//Spacing = 3 //Tollerance = 0 //MovingAverage = 40 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 TwoUp Then drawtext("2↑",barindex,low-spacing*pointsize,dialog,standard,12) coloured(0,255,0) ElsIf TwoDown Then drawtext("2↓",barindex,high+spacing*pointsize,dialog,standard,12) coloured(255,0,0) ElsIf InsideBar Then If low > Average[MovingAverage](close) Then drawtext("1",barindex,low-spacing*pointsize,dialog,standard,12) coloured(255,165,0) Else drawtext("1",barindex,high+spacing*pointsize,dialog,standard,12) coloured(255,165,0) EndIf ElsIf OutsideBar Then If low > Average[MovingAverage](close) Then drawtext("3",barindex,low-spacing*pointsize,dialog,standard,12) coloured(0,0,255) Else drawtext("3",barindex,high+spacing*pointsize,dialog,standard,12) coloured(0,0,255) EndIf 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
Hi,
Thank you for sharing your work with us.
I have loaded the ITF file but I have an error message asking to define the Movingaverage, spacing and tolerance.
Would you know how to sort that out ?
Strange that the ITF file did not import the parameters. You can either add the parameter yourself or simply uncomment line 1-3 (by removing the //).
Spacing = 3
Tollerance = 0
MovingAverage = 40
Hi JuanJ, just a question about the tollerance*pointsize. I know what it is/what it does (in theory). I just want to know your thoughts about it/how important you’ve found it to be. Any thoughts on how you set it with what you do?
Hi I am looking to number bars in a chart to ease analysis. Any idea if a program has been developped? Thanks.
Hi guys just copied the code but I keep getting an error message:
“Line 15 one of the following characters will be more suitable than “DRAWTEXT”:ENDIF”.
I tried making the changes several times but keep getting the same error message!
Does anyone has the correct code? Thanks