Plot AD Line as Cumulative
Author: KEVINP
Creation Date: 9/18/2015 10:44 PM
profile picture

KEVINP

#1
Hello,

I have a few questions. I tried searching briefly, but could not find answers.

1. How do I plot the Daily NYSE AD Line as a cumulative type chart? I used:
CODE:
Please log in to see this code.

and then tried plotting using LineStyle.Solid, but it does not appear to be cumulative.

1b. I also noticed that just plotting DataSeries NYSEADLine = GetExternalSymbol(".MB_ADV.N", true).Close is the same as subtracting declines from advancing? Why is that? I don't understand.


2. Does Position Management objects persist from day to day or session to different session? How is this situation handled?

3. How do I use the image tag in the toolbar above in this editor? I cannot figure out how to get an image inline in this post.

Thank you for the help.
profile picture

Eugene

#2
1 - Tools > Index-Lab > "Advance Decline Line" is cumulative. To build the index, you need to create a DataSet with all NYSE stocks and update it.

1b - You did something wrong. Feel free to share a code sample to illustrate as guesswork is suboptimal.

2 - What is a "session" and what is to "persist"? Please elaborate by starting a new thread.

Please note that it makes better sense to ask vastly unrelated questions in different threads rather than group them into one, thanks.

3 - Just like on every other board in the world, simply paste the image URL (like http://...) inside the IMG tag. The image should be uploaded somewhere (e.g. image hoster) and be publicly available (i.e. no private links visible to you only). However, the preferred way is to click "Add Attachment(s)" before posting - unless we're talking about linking to an image made already available by a 3rd party.
profile picture

KEVINP

#3
Regarding #1, I will start using the Index-Lab. Just out of curiosity, I was wondering if something could be done to get a cumulative AD Line from the pre-loaded Market Sentiment symbols DataSet. I tried to calculate an AD Line Percent:

CODE:
Please log in to see this code.


thinking this could be plotted as cumulative, but it does not work. Are there any workarounds, or is Index-Lab the only option?
profile picture

Eugene

#4
If you're asking me, then I'm not the one who's interested in devising workarounds when the solution is available! :)
profile picture

KEVINP

#5
Regarding #1b. My quote from above:

QUOTE:
1b. I also noticed that just plotting DataSeries NYSEADLine = GetExternalSymbol(".MB_ADV.N", true).Close is the same as subtracting declines from advancing? Why is that? I don't understand.


Eugene's quote:
QUOTE:
1b - You did something wrong. Feel free to share a code sample to illustrate as guesswork is suboptimal.



All 3 plotted in the same pane: I noticed that the Advancing - Declining takes the same shape as Advancing by itself. This behavior seems odd. I was not expecting Adv - Decl to look the same as Adv alone. Why is that? Am I confused about something?

CODE:
Please log in to see this code.


See image WLPro-ADLine-SamePane



When I plot all 3 in 3 different panes, the Adv-Decl looks exactly like Advancers alone. I think I am just confused to see this, and I don't understand why these two lines appear the same?

CODE:
Please log in to see this code.




See image WLPro-ADLines-3DiffPanes

Thank you.
profile picture

Eugene

#6
Thanks for providing more details.

QUOTE:
1b. I also noticed that just plotting DataSeries NYSEADLine = GetExternalSymbol(".MB_ADV.N", true).Close is the same as subtracting declines from advancing? Why is that? I don't understand.


Well, it turns out that it's not the same as it has different values. I guess this is explained by the fact that the advancers and decliners have a perfect negative correlation.
profile picture

KEVINP

#7
I did notice that the values are different between the advancer line and the adv-decl line. I also checked a couple of values on the adv-decl line and the subtraction is right. I also noted that the decliners have perfect negative correlation to the advancers. I think I was trying to understand the math concept, theorem, or property behind why the shape of the two lines are the same. I guess I'll leave it at that.

Eugene: thank you for the help.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).