Volume indicator

Questions about MultiCharts .NET and user contributed studies.
User avatar
clint454
Posts: 41
Joined: 21 Jun 2022
Has thanked: 22 times

Volume indicator

Postby clint454 » 06 May 2024

I have a custom volume indicator in histogram form that needs a hidden tick chart on my 3 minute chart. However, it only loads about 30 histogram bars (3 min). My programmer is stumped on any workaround due to his comments below.
----------------------------------
MultiCharts automatically figures out how many lookback bars the code needs, and won’t calculate until that many bars are on the chart. It does this for efficiency and ease of use, but as is the way with such “ease of use” things it can get in the way of doing things properly.

In this case, having to look back on 1 tick bars to gather volume data affects how many chart bars are required. This isn’t totally logical, alas, but it is how it works.

Imagine that you are looking at 10 minute bars on your chart, and there are 177000 ticks in a busy 10 minute bar at the open of the session. MultiCharts now thinks its maximum lookback is 177000 and won’t display anything until you have that many chart bars.
-------------------------------------

Any possible workaround? I attached a screenshot and the indicator code.
Attachments
shVolumeComposition_Apr29_2024.pln
(5.08 KiB) Downloaded 9 times
volume.jpg
(158.89 KiB) Not downloaded yet

Return to “MultiCharts .NET”