Chart label for sector volume


Category:
0
0

Need some help in writing a study for incremental volume for each sector, please advise. Here is the code for XLK

#Technology
input XLK_PCT = 29.13;
def XLK_Volume = (volume(“XLK”) – volume(“XLK”)[1]) / volume(“XLK”)[1] * XLK_PCT / 100;
ADDLABEL(YES,”XLK VOL:”, COLOR.gray);

AddLabel(yes, Round(XLK_VOLUME,2),COLOR.GRAY);

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on January 30, 2022 4:24 pm
83 views
0
Private answer

I moved this question out of the "Strategy Guide" topic and into the "Chart Studies" topic. The Strategy Guide topic is meant for questions related to back-testing chart strategies and Conditional Orders. Your question is for a chart study so it should have been posted there instead.

The code you have there is working fine. Nothing wrong with it. The problem is that when a chart study contains only volume information the platform places the chart study in the Volume Subgraph. And if your chart is set so the volume subgraph is turned off, the study appears to be missing from the chart. But it is not.

Solution:

In the Edit Studies view, locate the study that has been placed in the "Volume" section and click and drag it into the Price section of one of the Lower sections.

I have included two screenshots below to demonstrate the steps required to make this adjustment.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on January 30, 2022 4:47 pm