Inside Bar
Forums › ProRealTime English forum › ProBuilder support › Inside Bar
- This topic has 4 replies, 4 voices, and was last updated 1 year ago by bernardmorel.
Tagged: Inside BAR
-
-
09/12/2020 at 8:50 AM #143992
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
09/12/2020 at 9:12 AM #143998Topic 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.
09/12/2020 at 10:37 AM #144014Not tested:
123456InsideBAR = range < range[1] AND low >= low[1] AND high <= high[1]IF InsideBAR THENDrawSegment(Barindex[1],high,BarIndex,high)DrawSegment(Barindex[1],low ,BarIndex,low)ENDIFRETURN09/15/2020 at 2:47 PM #144349Thks. I ended up with the following. Hope it helps any other IB trader.
12345678910111213141516171819202122232425262728293031323334353637383940// ==========================================// 'Inside Bar' Display on screen// Version 1.0 - 20200913 - IB// gfx2trade// ==========================================// ==================================================================================// Further ideas to code// ==================================================================================// n/a// ==================================================================================// Definition && Affectation// ==================================================================================IBG = averagetruerange[14](close)*0.2IBU = 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 thenDRAWSEGMENT(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)endifif IBD thenDRAWSEGMENT(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)endifRETURN09/12/2023 at 4:26 PM #220881Good 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
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on