2 Indicators
2 Indicators
logic
The indicators are 2, "2 indicators", and "Candle Patterns without Labels"
I need to see if there is a cross between the white line, and the green-red line
from the indicator "2 indicators"
In other hand, when that is recognized, i need to filter the signal, if there is an
arrow from the indicator "Candle Patterns without Labels" 2 or 3 candles
before the cross from "2 indicators"
And then if the signal is a sell and the price is down the ema 200, i need a plot
of the signal
if the signal is a buy and the price is up the ema 200, i need a plot of the signal
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
data2=(close[2] > open[2] and min(open[1], close[1]) > close[2] and open <
min(open[1], close[1]) and close < open )
plotshape(data2, title= "Evening Star", color=red, style=shape.arrowdown, text="")
data3=(close[2] < open[2] and max(open[1], close[1]) < close[2] and open >
max(open[1], close[1]) and close > open )
plotshape(data3, title= "Morning Star", location=location.belowbar, color=lime,
style=shape.arrowup, text="")
data4=(open[1] < close[1] and open > close[1] and high - max(open, close) >=
abs(open - close) * 3 and min(close, open) - low <= abs(open - close))
plotshape(data4, title= "Shooting Star", color=red, style=shape.arrowdown, text="")
data6=(close[1] > open[1] and open > close and open <= close[1] and open[1] <=
close and open - close < close[1] - open[1] )
plotshape(data6, title= "Bearish Harami", color=red, style=shape.arrowdown,
text="")
data7=(open[1] > close[1] and close > open and close <= open[1] and close[1] <=
open and close - open < open[1] - close[1] )
plotshape(data7, title= "Bullish Harami", location=location.belowbar, color=lime,
style=shape.arrowup, text="")
data8=(close[1] > open[1] and open > close and open >= close[1] and open[1] >=
close and open - close > close[1] - open[1] )
plotshape(data8, title= "Bearish Engulfing", color=red, style=shape.arrowdown,
text="")
data9=(open[1] > close[1] and close > open and close >= open[1] and close[1] >=
open and close - open > open[1] - close[1] )
plotshape(data9, title= "Bullish Engulfing", location=location.belowbar,
color=lime, style=shape.arrowup, text="")
upper = highest(10)[1]
data10=(close[1] < open[1] and open < low[1] and close > close[1] + ((open[1] -
close[1])/2) and close < open[1])
plotshape(data10, title= "Piercing Line", location=location.belowbar, color=lime,
style=shape.arrowup, text="")
lower = lowest(10)[1]
data11=(low == open and open < lower and open < close and close > ((high[1] -
low[1]) / 2) + low[1])
plotshape(data11, title= "Bullish Belt", location=location.belowbar, color=lime,
style=shape.arrowup, text="")
data14=(((high-low>4*(open-close))and((close-low)/(.001+high-low)>=0.75)and((open-
low)/(.001+high-low)>=0.75)) and high[1] < open and high[2] < open)
plotshape(data14, title= "Hanging Man", color=red, style=shape.arrowdown, text="")
data15=((close[1]>open[1])and(((close[1]+open[1])/
2)>close)and(open>close)and(open>close[1])and(close>open[1])and((open-close)/(.001+
(high-low))>0.6))
plotshape(data15, title= "Dark Cloud Cover", color=red, style=shape.arrowdown,
text="")
///////////////////////////////////////////////////////////////////////////////////
/////////
///////////////////////////////////////////////////////////////////////////////////
////////
///////////////////////////////////////////////////////////////////////////////////
///////
//@version=5
indicator("2 indicator", precision=0, timeframe='', timeframe_gaps = true)
if _length > 2
w2 := math.round(w)
w1 := math.round((_length - w2) / 2)
w3 := int((_length - w2) / 2)
L1 := ta.wma(_data, w1)
L2 := ta.wma(L1, w2)
L3 := ta.wma(L2, w3)
L3
else
L3 := _data
L3
L3
//====================================
LL = f_LazyLine(price, alpha)
c_up = color.new(#33ff00, 0)
c_dn = color.new(#ff1111, 0)
uptrend = LL > LL[1]
//
===================================================================================
=====================================
// v2: add optional up/dn arrow signal on change of direction (swing)
ShowSig = input(title='Up/Dn Swing Signal?', defval=false)
SigMulti = input.float(title='Signal Locator %', defval=1.0, step=0.2, minval=0,
maxval=20)
d = SigMulti / 100 * LL //we'll use this to tweak a good location for the signal
(that is not tied to price-specific parameters)
//
===================================================================================
=====================================
// v3: enable alerts