all in one best indicator
all in one best indicator
if ph
add_to_array(tval, tpos, ph)
if pl
add_to_array(bval, bpos, pl)
// line definitions
maxline = 3
var bln = array.new_line(maxline, na)
var tln = array.new_line(maxline, na)
if valid
uv1 := hline - diff
uv2 := val2
up1 := lloc
up2 := pos2
break
dv1 = 0.0
dv2 = 0.0
dp1 = 0
dp2 = 0
if countlinehi <= maxline
for p2 = PPnum - 1 to p1 + 1
val1 = array.get(tval, p1)
val2 = array.get(tval, p2)
pos1 = array.get(tpos, p1)
pos2 = array.get(tpos, p2)
if val1 < val2
diff = (val2 - val1) / float(pos1 - pos2)
hline = val2 - diff
lloc = bar_index
lval = high
valid = true
for x = pos2 + 1 - prd to bar_index
if close[bar_index - x] > hline
valid := false
break
lloc := x
lval := hline
hline := hline - diff
if valid
dv1 := hline + diff
dv2 := val2
dp1 := lloc
dp2 := pos2
break
C_DownTrend = true
C_UpTrend = true
if trendRule == trendRule1
if trendRule == trendRule2
C_ShadowEqualsPercent = 100.0
C_DojiBodyPercent = 5.0
C_Factor = 2.0 // shows the number of times the shadow dominates the candlestick
body
C_Range = high-low
C_OnNeckBearishNumberOfCandles = 2
C_OnNeckBearish = false
if C_DownTrend and C_BlackBody[1] and C_LongBody[1] and C_WhiteBody and open <
close[1] and C_SmallBody and C_Range!=0 and abs(close-low[1])<=C_BodyAvg*0.05
C_OnNeckBearish := true
C_RisingWindowBullishNumberOfCandles = 2
C_RisingWindowBullish = false
C_RisingWindowBullish := true
C_FallingWindowBearishNumberOfCandles = 2
C_FallingWindowBearish = false
C_FallingWindowBearish := true
C_FallingThreeMethodsBearishNumberOfCandles = 5
C_FallingThreeMethodsBearish = false
C_FallingThreeMethodsBearish := true
C_RisingThreeMethodsBullishNumberOfCandles = 5
C_RisingThreeMethodsBullish = false
C_RisingThreeMethodsBullish := true
C_TweezerTopBearishNumberOfCandles = 2
C_TweezerTopBearish = false
C_TweezerTopBearish := true
C_TweezerBottomBullishNumberOfCandles = 2
C_TweezerBottomBullish = false
C_TweezerBottomBullish := true
C_DarkCloudCoverBearishNumberOfCandles = 2
C_DarkCloudCoverBearish = false
if (C_UpTrend[1] and C_WhiteBody[1] and C_LongBody[1]) and (C_BlackBody and open >=
high[1] and close < C_BodyMiddle[1] and close > open[1])
C_DarkCloudCoverBearish := true
C_DownsideTasukiGapBearishNumberOfCandles = 3
C_DownsideTasukiGapBearish = false
C_DownsideTasukiGapBearish := true
C_UpsideTasukiGapBullishNumberOfCandles = 3
C_UpsideTasukiGapBullish = false
C_UpsideTasukiGapBullish := true
C_EveningDojiStarBearishNumberOfCandles = 3
C_EveningDojiStarBearish = false
C_EveningDojiStarBearish := true
C_DojiStarBearishNumberOfCandles = 2
C_DojiStarBearish = false
if C_UpTrend and C_WhiteBody[1] and C_LongBody[1] and C_IsDojiBody and C_BodyLo >
C_BodyHi[1]
C_DojiStarBearish := true
C_DojiStarBullishNumberOfCandles = 2
C_DojiStarBullish = false
if C_DownTrend and C_BlackBody[1] and C_LongBody[1] and C_IsDojiBody and C_BodyHi <
C_BodyLo[1]
C_DojiStarBullish := true
C_MorningDojiStarBullishNumberOfCandles = 3
C_MorningDojiStarBullish = false
C_MorningDojiStarBullish := true