gfxParticipant
Average
Hi all,
I am looking for an easy way to identify on the price chart the inside bar configuration.
In other words, when the latest bar is inside the previous, I would like a short line to be drawn 1 tick above and another on tick below both bars.
Has someone already coded such an indicator ?
Thks for helping.
B.
gfx
Topic moved from french forum to english forum, please make sure before posting a message it is in sync with the forum rules in the big yellow box below (in this particular case, the 3rd one: using same language as chosen forum), thank you.
Not tested:
InsideBAR = range < range[1] AND low >= low[1] AND high <= high[1]
IF InsideBAR THEN
DrawSegment(Barindex[1],high,BarIndex,high)
DrawSegment(Barindex[1],low ,BarIndex,low)
ENDIF
RETURN
gfxParticipant
Average
Thks. I ended up with the following. Hope it helps any other IB trader.
// ==========================================
// 'Inside Bar' Display on screen
// Version 1.0 - 20200913 - IB
// gfx2trade
// ==========================================
// ==================================================================================
// Further ideas to code
// ==================================================================================
// n/a
// ==================================================================================
// Definition && Affectation
// ==================================================================================
IBG = averagetruerange[14](close)*0.2
IBU = open[1]<close[1] and high[0]<high[1] and low[0]>low[1]
IBD = open[1]>close[1] and high[0]<high[1] and low[0]>low[1]
// ==================================================================================
// Calculs
// ==================================================================================
// ----------------------------------------------------------------------------------
// Inside Bar
// ----------------------------------------------------------------------------------
if IBU then
DRAWSEGMENT(barindex-1,high[1]+IBG,barindex,high[1]+IBG) coloured(255,153,0)
DRAWSEGMENT(barindex-1,low[1]-IBG,barindex,low[1]-IBG) coloured(255,255,0)
endif
if IBD then
DRAWSEGMENT(barindex-1,high[1]+IBG,barindex,high[1]+IBG) coloured(255,153,0)
DRAWSEGMENT(barindex-1,low[1]-IBG,barindex,low[1]-IBG) coloured(255,255,0)
endif
RETURN
Good evening Thank you for your response and your collaboration I copied the codes and included them in the indicators But they did not work and no results on the graph I must have done something wrong but I have already done it this way and it worked J For the moment I have the out side candle indicator and it helps me a lot. Kind regards