Ok, so I replaced the “buy” and “sell” text with ellipse including the candlesticks that generate the signals. They are drawn 1 bar after the signal, because to include correctly the candlestick into the circle, we need to start to draw it before the bar and end after it.
// Conditions to enter long positions
indicator1 = Cycle(close)
c1 = (indicator1 CROSSES OVER 0)
IF c1 THEN
DRAWARROWUP(barindex, low*0.999) coloured (0,255,255)
//DRAWTEXT("BUY", barindex, LOW*0.992,SansSerif,Bold,12)coloured(0,255,255)
ENDIF
if c1[1] then
DRAWELLIPSE(barindex[2], low[1], barindex, high[1])coloured(0,255,255)
endif
// Conditions to exit long positions
indicator2 = CCI[20]
c2 = (indicator2 CROSSES OVER 100)
IF c2 THEN
ENDIF
// Conditions to enter short positions
indicator3 = Cycle(close)
c3 = (indicator3 CROSSES UNDER 0)
IF c3 THEN
DRAWARROWDOWN(barindex, HIGH*1.001) coloured (128,0,128)
//DRAWTEXT("SELL", barindex, HIGH*1.008,SansSerif,Bold,12)coloured(128,0,128)
ENDIF
if c3[1] then
DRAWELLIPSE(barindex[2], low[1], barindex, high[1])coloured(128,0,128)
endif
// Conditions to exit short positions
indicator4 = CCI[20]
c4 = (indicator4 CROSSES UNDER -100)
IF c4 THEN
ENDIF
//Inside Bar Breakout Failure indicator
bullcandle=open<close
bearcandle=open>close
insidebarbear= bearcandle and high[0]<high[1] and low[0]>low[1]
if insidebarbear then
DRAWTEXT("↓", barindex, high[1], Dialog, ITALIC,10) COLOURED(147,112,219)
//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)
DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(255,0,0)
endif
insidebarbull= bullcandle and high[0]<high[1] and low[0]>low[1]
if insidebarbull then
DRAWTEXT("↑", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)
//DRAWARROWDOWN(barindex,high[1]) COLOURED(0,0,0)
DRAWCANDLE(open,high,low,close) COLOURED(0,0,0) BORDERCOLOR(0,255,0)
endif
insidebarFailureBull=bullcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbull[1] and close[0]<close[1] and close[0]>open[1]) or insidebarbear[1] and close[0]<open[1] and close[0]>close[1] //
if insidebarFailureBull and not (insidebarbear or insidebarbull) then
DRAWTEXT("¬", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)
DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(0,255,0)
//DRAWARROWUP(barindex,low[0]) COLOURED(0,255,0)
endif
//================
insidebarFailureBear=bearcandle and (low[1]<Low[0] or high[1]>high[0]) and(insidebarbear[1] and close[0]>close[1] and close[0]<open[1]) or insidebarbull[1] and close[0]>open[1] and close[0]<close[1]
if insidebarFailureBear and not (insidebarbear or insidebarbull) then
DRAWTEXT("∟", barindex, high[1], Dialog,ITALIC, 10) COLOURED(147,112,219)
DRAWCANDLE(open,high,low,close) COLOURED(255,255,255) BORDERCOLOR(255,0,0)
//DRAWARROWUP(barindex,low[0]) COLOURED(255,0,0)
endif
RETURN