Mark candle if volume x percent greater than previous


Category:
0
0

Hi Pete

I would like an indicator with up arrow under the candle that has a minimum of 100% increase in volume compared to previous candle on a 1 minute timeframe.

Thanks

Marked as spam
Posted by (Questions: 12, Answers: 4)
Asked on June 24, 2019 6:28 pm
248 views
0

I will need to update the title of your question because "volume indicator" does not cut it. Far too vague and we need these titles to contain the full context of the question. This is for the benefit of the rest of our viewers. Viewers that have a similar question need to be able to search for and find your post.

Now on to your question. You state this in a way that needs clarification: "has a minimum of 100% increase in volume". So let's say the previous candle has a volume of 500. Did you want this arrow to appear if the current candle's volume is 1,000? The reason I ask is because the math looks like this: 500 X 2 = 1,000. So that is stated slightly different than how you expressed it: "current volume is greater than or equal to previous volume times 200%"

Otherwise, a literal interpretation of your statement would leave us with: 500 x 1 = 500. Or stated this way: "current volume is greater than or equal to previous volume time 100%".

( at June 25, 2019 3:53 pm)
0
yes Pete you are correct. I.e 500x2 = 1000. If previous volume 1min bar is 500 current volume bar with indication should be 1000.
( at June 29, 2019 9:05 pm)
0
Private answer

try this, the input there is 2 = two times and up, if you choose 3 is  three times and up, if you choose 4 is four times and up and so on.

#breakoutbar
input previousbartimes = 2;
def previousbar = volume[1];
def curVolume = volume;
def breakoutbar = curVolume >= previousbar * previousbartimes;
plot bob = (if breakoutbar then low else Double.NaN);
bob.SetPaintingStrategy(PaintingStrategy.arrow_up);

Attachments:
Marked as spam
Posted by (Questions: 8, Answers: 23)
Answered on June 30, 2019 7:04 pm