juanj

#TheStrat Candles

Category: Indicators By: juanj Created: January 12, 2021, 4:45 PM
January 12, 2021, 4:45 PM
Indicators
5 Comments
#TheStrat Candles

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:

//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

 

Download
Filename: The-Strat-Candles.itf
Downloads: 429
juanj
juanj Master
My name is Juan Jacobs and I am an algorithmic trader and trading coach. After 7 years of corporate work as a Systems Analyst, I have decided to pursue my passion of trading on a full-time basis. My current focus area is that of 'smart' strategies based on 'Machine Learning'. You can find me at www.FXautomate.com or visit my PRC Marketplace Store here: https://market.prorealcode.com/store/fxautomate/
Author’s Profile

Comments

goldenfish67
4 years ago
#

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

JOKAMAURICE
5 years ago
#

Hi I am looking to number bars in a chart to ease analysis. Any idea if a program has been developped? Thanks.

Finning
6 years ago
#

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?

juanj
6 years ago
#

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

hErOSTiC
6 years ago
#

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 ?

ProRealCode ProRealCode
Loading...