Divide two fundamental items and plot into a ChartPane
Author: tobiastempus
Creation Date: 1/24/2018 9:23 AM
profile picture

tobiastempus

#1
hi,

i want to divide two fundamental items and plot the result in a chartpanel :

CODE:
Please log in to see this code.


i tried this link to get help but the link doesnt work :
http://www2.wealth-lab.com/WL5WIKI/vidIndicators1.ashx
profile picture

Eugene

#2
Hi,

The link doesn't work because your browser doesn't support Flash. And since no Flash plugin or no Flash itself is installed the content cannot be displayed. However, this is not an indicator and so I don't think the video would be useful in this context.

The fundamental items should be defined in your code as FundamentalDataSeries. Check this entry in the QuickRef (F11 key) and you'll learn by code example. Now that you've got two DataSeries your next step is to see how math operations on DataSeries work by reading the howto in the WealthScript Programming Guide > DataSeries > Series Operators: "How to: Multiply, Divide, Add, or Subtract a DataSeries by another".

You should come up with something like this:

CODE:
Please log in to see this code.
profile picture

tobiastempus

#3
i thank you for your quick Response.

is there a possibility to see the var division in a chartpanel?

i tried this but it doesnt work:

CODE:
Please log in to see this code.
profile picture

Eugene

#4
Check your syntax, there's a typo:
CODE:
Please log in to see this code.

Read the compiler output at the bottom of Strategy Editor window for helpful hints.

On a more general note:

1. Please read answers to your posts more carefully. I found out that before I did so Cone had already suggested you how to divide two fundamental items (see post #4):

Unexpected signal using Fundamental Item Annual Growth Rate?

2. As for your "doesn't work", it doesn't work on our forum. It's arguably the less desirable and useful information for troubleshooting. Here's some recommended reading: How to Report Bugs Effectively > "It doesn't work".
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).