Do you really want to “know how to create” this….? Or are you just asking me to create it?
If you are asking how, I can give you some guidance and you can try to work this out on your own.
You already have the condition worked out, so you should be able to write that statement without any problem.
The way we change the color of the candle is by using “AssignPriceColor()”. (There are several examples scattered throughout the forum)
It basically looks like this:
AssignPriceColor(if condition then Color.YELLOW else Color.CURRENT);
There you go. I have shown you how to create it. You should be able to do this in two statements, one if your good.
Update 11/9/18
After comments from the author of this post I realized I did not understand the request clearly
Sorry about that. I missed the part that you are asking to color the volume bars. I thought you wanted to color the bars on the chart. So here is a full lower study that plots volume bars (which must be done before we can color them).
plot volumeData = volume;
volumeData.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volumeData.SetLineWeight(3);
volumeData.AssignValueColor(if volumeData > volumeData[1] then Color.GREEN else if volumeData > 100000000 then Color.YELLOW else Color.RED);
I am getting an error. I am using this on the dialey chart volume section.
AssignPriceColor(if volume > 100000000 then Color.YELLOW else Color.CURRENT)
Every statement of code must end with a semicolon “;”
Sorry I missed that, the code however changes the price bars and not the volume bars?
I think the statement “AssignPriceColor” may be wrong. Should it be something like AssignVolumeBarColor ?????
I have updated my answer to include the solution you were actually seaking. Sorry about that, thought you only wanted to color chart bars.