Pine script 灯芯抑制吞噬指示器

Pine script 灯芯抑制吞噬指示器,pine-script,trading,forex,Pine Script,Trading,Forex,尝试制作一个指标,显示灯芯被拒绝后有500万支蜡烛被吞没——例如,如果有一支灯芯为身体大小的75%x的牛市蜡烛,然后我们得到一支熊市蜡烛,它将显示一个迹象(耗尽,然后吞没)。到目前为止,我的代码似乎不适用于wick拒绝,只适用于吞没,有什么想法吗 //@version=4 study("AW Enties Current", overlay=true) show = timeframe.period == "5" // get body size bo

尝试制作一个指标,显示灯芯被拒绝后有500万支蜡烛被吞没——例如,如果有一支灯芯为身体大小的75%x的牛市蜡烛,然后我们得到一支熊市蜡烛,它将显示一个迹象(耗尽,然后吞没)。到目前为止,我的代码似乎不适用于wick拒绝,只适用于吞没,有什么想法吗

//@version=4
study("AW Enties Current", overlay=true)

show = timeframe.period == "5"

// get body size
body = abs(open - close)

// get upside wick
USWC = abs(high + open - body)

// Get downside wick
DSWC = abs(low + close - body)


// Get engulfing candles
// Gets the engulfing if the previous candle has a wick bigger than the body and this candle is an 
engulfing candle
bearishEC = close < open[1] and close[1] > open[1] and USWC[1] > body[1]
bullishEC = close > open[1] and close[1] < open[1] and DSWC[1] > body[1]

// Plot EC to chart
plotshape(show and bearishEC, title="Short", location=location.abovebar, color=color.red, transp=0, 
style=shape.triangledown)
plotshape(show and bullishEC, title="Long", location=location.belowbar, color=color.green, transp=0, 
style=shape.triangleup)
/@version=4
研究(“AW实体当前”,叠加=真实)
show=timeframe.period==“5”
//获得体型
车身=防抱死制动系统(打开-关闭)
//把灯芯朝上
USWC=防抱死制动系统(高位+开式-车身)
//得到向下的灯芯
DSWC=防抱死制动系统(低+关闭-车身)
//点燃蜡烛
//如果前一根蜡烛的灯芯比身体大,而此蜡烛是一根蜡烛,则获取吞没
吞噬蜡烛
bearishEC=关闭<打开[1]和关闭[1]>打开[1]和USWC[1]>主体[1]
bullishEC=close>open[1]和close[1]body[1]
//将EC绘制成图表
plotshape(show and bearishEC,title=“Short”,location=location.overbar,color=color.red,transp=0,
样式=形状。三角形向下)
plotshape(show和bullishEC,title=“Long”,location=location.belowbar,color=color.green,transp=0,
style=shape.triangleup)