Highlight highest volume candle


Category:
0
0

Hello Pete, how do we create a chart indicator study that highlights the highest volume candle on the 1 minute chart?

The condition is highlighting the candle with the greatest volume on the 1 minute chart purple.
The minimum volume on that candle must be 50k shares.

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on January 23, 2019 9:07 pm
163 views
0

This may not be possible. When you say “highest volume candle on 1 min chart”. Is that for just the current day? Or for each individual day? Or for a span of days currently viewable on the chart?

( at January 27, 2019 10:42 am)
0

Just the highest volume candle on the view able chart.

I wanted to let you know that this will be primarily used on the 1 minute timeframe and this is where I will test the code.

Thank you

( at January 27, 2019 4:59 pm)
0
Private answer

Now that we have details provided in the comment section above we can provide a solution.

declare lower;
def highestVolume = HighestAll(volume);
def target = volume == highestVolume;
plot vol = volume;
vol.AssignValueColor(if target then Color.WHITE else Color.CYAN);
vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
vol.SetLineWeight(3);

Screenshot below shows the result.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 28, 2019 10:53 am
0

This is awesome, thank you to the OP and Pete. My question to this thread is, how can this code be modified to highlight the highest volume candle under the same conditions as the original post but with one extra condition.

Highlight the highest volume candle whose price is at least 30% greater than the open. I have started the code below

def highestVolume = HighestAll(volume);
def target = volume == highestVolume;
AssignpriceColor(if target then Color.yellow else Color.current);

plot price = volume;
price.SetLineWeight(3);

This code above highlights the highest volume candle.

But how can it be modified to only highlight a candle if the stocks price is at least 30% up from the open?
The code for greater than 30% from the open is provided below

def dailyPercentChange = Round(100 * (close / open – 1), 2);
plot scan = dailyPercentChange > 35;

( at January 29, 2019 2:03 pm)
0

i can provide a screenshot of this behavior if needed

( at January 29, 2019 3:31 pm)