PriceAndVolumeTrend Consolidation Chart Label


Category:
0
0

Hello Pete,

As we know in the market when volume drops price tends to fall as well. However, in some cases, this not always true and wanted to work with to create a chart label to show this behavior. There is an indicator that shows this behavior called PriceAndVolumeTrend study. I am requesting if we can create a chart label that calculates the PVT Value when consolidating.

 

Condition.

When the Price Volume Trendline indicator is consolidating (trading in a tight range), Then plot label that = “Price Neutralizing” with a yellow background.

 

Please see the photo with the yellow arrow

 

 

Attachments:
Marked as spam
Posted by (Questions: 22, Answers: 63)
Asked on December 15, 2018 10:30 pm
200 views
0

You will need to provide the method for determining “When the Price Volume Trendline indicator is consolidating”. It must be expressed in mathematical terms, which can be used to identify these “consolidations”.

( at December 17, 2018 8:20 am)
0

The PVT % change is within the range of -25 and +25% from 1 candle ago.

If the PVT% change increases or decreases more the plus or minus 25% then the price is NO LONGER Consolidating aka “Neutralizing”

( at December 17, 2018 9:42 am)
0
Private answer

After requesting more details we have the math to complete this. The author of the post is calling for a one bar consolidation. Comparing the percentage change from the previous bar to the current bar. Any value less than +/-25% is “Consolidating”, otherwise it is “Neutralizing”

def clPrev = close[1];
def data = TotalSum(if clPrev != 0 then (close - clPrev) / clPrev * volume else 0);
def upperLimit = data * 1.025;
def lowerLimit = data * 0.75;
def condition = data > lowerLimit[1] and data < upperLimit[1];
AddLabel(yes, if data then "Consolidating" else "Neutralizing", Color.GRAY);

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on December 18, 2018 7:21 am
0

from testing this, it seems that the math is a little extreme, how can we modify the code to use 7% instead of 25%

The PVT % change is within the range of -7 and +7% from 1 candle ago.

( at December 18, 2018 9:14 am)
0

Change 1.025 to 1.07 and change 0.75 to 0.93

( at December 18, 2018 10:22 am)