Louis Winthorp III

3 Black Crows, 3 White Soldiers

Category: Indicators By: Louis Winthorp III Created: May 31, 2018, 11:03 AM
May 31, 2018, 11:03 AM
Indicators
1 Comment
3 Black Crows, 3 White Soldiers

Detection of the candlestick pattern 3 Black Crows and 3 White Soldiers. The indicator contains extra parameters for detecting any sequence of alternative numbers of crows/soldiers (e.g. 2, 3, 4, etc). Extra optional condition is inserted to take into account the minimum ratio between the body and the range of candle. (e.g. the bodies must be at least 70% of the total candle)

//Candlestick pattern x crows / x soldiers
//With or without body length compared to the wicks
//E.g. body must be at least 70% of total candle

//Parameters
NbrCandles = 3
Bodysize = 70 //in percentage
BodySizeOnOff = 1 //standard 'On'

//3 or x white soldiers
for i=0 to NbrCandles-1 do
 CondSoldier = close[i] > open[i] and close[i] > close[i+1]
 If BodySizeOnOff then
  CondBodySizeSoldier = (((close[i] - open[i]) / (high[i]- low[i])) > (BodySize / 100))
  if CondSoldier and CondBodySizeSoldier then
   else
    CondSoldier = 0
    break
  endif
 elsif CondSoldier then
  else
   CondSoldier = 0
   break
 endif
next

//3 or x black crows
for i=0 to NbrCandles-1 do
 CondCrows = close[i] < open[i] and close[i] < close[i+1]
 If BodySizeOnOff then
  CondBodySizeCrows = (((open[i] - close[i]) / (high[i]- low[i])) > (BodySize / 100))
  if CondCrows and CondBodySizeCrows then
   else
    CondCrows = 0
    break
  endif
 elsif CondCrows then
  else
   CondCrows = 0
   break
 endif
next

//Determining and drawing of indicator
if CondSoldier = 1 then
 //3 or x White Soldiers
 CrowSoldier = 1
elsif CondCrows = 1 then
 //3 or x Black Crows
 CrowSoldier = -1
else
 CrowSoldier = 0
endif

HorLine = 0

return CrowSoldier as "CrowSoldier", HorLine coloured (0,0,255) as "HorLine"

Download
Filename: 3Crows3Soldiers.itf
Downloads: 481
Louis Winthorp III
Louis Winthorp III Average
Operating in the shadows, I hack problems one by one. My bio is currently encrypted by a complex algorithm. Decryption underway...
Author’s Profile

Comments

Ravindra Khanna
3 years ago
#

copied it to pro real time not working. what to do?

ProRealCode ProRealCode
Loading...