Chart Label for Highest Volume Date and Total on Daily Chart


Category:
0
0

Hi Pete, is it possible to have a chart label showing the Highest Volume Day on a Daily Chart and How much Volume on that particular day.. thanks.

Marked as spam
Posted by (Questions: 4, Answers: 5)
Asked on January 3, 2020 3:14 pm
98 views
0
Private answer

This was quite a challenge. I hope not to offend any of may paying clients by providing this solution at no charge in the Q&A forum. I have been paid for solutions less challenging to complete.

For some reason I could not get the chart labels to appear without including a chart bubble. So this code shows the labels you requested and it also places a chart bubble at the high of the bar with the highest volume for all the bars displayed on the chart.

def highestVolume = HighestAll(volume);
def targetBar = volume == highestVolume;
rec counter = if targetBar then 1 else counter[1] + 1;
plot data = Double.NaN;
AddLabel(yes, Concat("Highest Volume: ", highestVolume), Color.WHITE);
AddLabel(yes, Concat(GetValue(GetMonth(), counter - 1), Concat("/", Concat(GetValue(GetDayOfMonth(GetYyyyMmDd()), counter - 1), Concat("/", GetValue(GetYear(), counter - 1))))));
AddChartBubble(targetBar, high, Concat(GetMonth(), Concat("/", Concat(GetDayOfMonth(GetYyyyMmDd()), Concat("/", GetYear())))));

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on January 3, 2020 7:02 pm
0
Hey Pete How are you? is there any way to color the label the same color as the candle?
( at February 24, 2020 2:52 pm)
0
AddChartBubble(targetBar, high, Concat(GetMonth(), Concat("/", Concat(GetDayOfMonth(GetYyyyMmDd()), Concat("/", GetYear())))), if close > open then Color.UPTICK else Color.DOWNTICK);
( at February 24, 2020 3:56 pm)