bar counting to help analysing
Forums › ProRealTime English forum › ProBuilder support › bar counting to help analysing
- This topic has 14 replies, 4 voices, and was last updated 1 year ago by choccy_bear.
-
-
10/31/2021 at 3:23 PM #180668
Hi, I am looking for a bar counting code that would print under each bar its number starting from the beginning of the session. It helps a lot when studying price action. I know it is available on Ninja.
Thanks in advance.
Maurice10/31/2021 at 4:09 PM #180678There you go:
123x = barindexdrawtext("#x#",barindex,low - range)return10/31/2021 at 4:20 PM #180681Sorry, it does not work
10/31/2021 at 4:22 PM #180682It does work on my platform.
Did you put it ON your chart (not below)?10/31/2021 at 4:41 PM #180683Sorry, what do you mean exactly. I have a Dax chart 5 min the I go to indicators and I create a new one. I paste your code and I get the attached picture
10/31/2021 at 6:51 PM #180692I understood what you meant and it works but may I ask a question. How to start the counting lets say at 9 am each day until 11PM for example?
Because it starts the counting on a 5 min chart on 28 oct.
Thank a lot for your help.
10/31/2021 at 7:25 PM #180696There you go:
123456789Once Tally = 0If OpenTime = 090000 ThenTally = 0EndifIf (OpenTime >= 090000) And (OpenTime <= 230000) ThenTally = Tally + 1drawtext("#Tally#",barindex,low - range)Endifreturn1 user thanked author for this post.
10/31/2021 at 7:45 PM #180699A very great thank you.
10/31/2021 at 9:22 PM #180700Link to above code added as Log 309 here …
1 user thanked author for this post.
11/03/2021 at 5:47 PM #180881Dear Roberto,
Your program works beautifully. Just a question if I a may (without abusing of your patience) the position of the figures is quite strange, sometimes very low sometimes very close to the bar. Is there any way to fix some distance below the low of the bar?
All the best.
Maurice11/03/2021 at 5:59 PM #180884There’s no instruction to anchor the text on a fixed point of the chart (it’s in the pipeline, though), but this could help display them at a better distance. Replace line 7 with:
1drawtext("#Tally#",barindex,lowest[5](low) - highest[5](range))changing periods (I used 5) from 2 to any number (I suggest it to not be greater than 50) could let you better fine tune the output.
1 user thanked author for this post.
11/03/2021 at 6:14 PM #180885Thank you, it is a lot better.
08/17/2023 at 9:22 AM #219244Hi Maurice,
How did you manage to get this bar count to show on the main chart as opposed to a panel at the bottom?
I keep having the same issue as you did with it only showing at the bottom of the chart and not on the chart itself.
Thanks
Jay
08/17/2023 at 9:41 AM #219246You have to add it by going on the price menu on the top left of the chart and then add an indicator
1 user thanked author for this post.
08/17/2023 at 12:22 PM #219250Thanks for responding, Maurice.
It embarrasses me to say that it took a lot longer than I expected to figure out how to do it even after you telling me how!
BTW this is great for watching PA in the Al Brooks format.
Jay
-
AuthorPosts
Find exclusive trading pro-tools on