PlotSeries Error outside of PricePane
Author: lookingbackon
Creation Date: 10/13/2015 3:10 AM
profile picture

lookingbackon

#1
Hello,
Tried to plot a line which connect the Open Interest Value point with the below code:
CODE:
Please log in to see this code.

But it doesn't Work. Is It possible to plot the line outside the price pane? Could you help to address the error or come up with a solution?Thanks



profile picture

Eugene

#2
Hello,

QUOTE:
But it doesn't Work.

Please read this carefully: How to Report Bugs Effectively > "It doesn't work", then follow author's suggestions and summary.

Having finished with that, please indicate:

1. have you identified that your data actually contains an "Open Interest" series? Note that the string is context-sensitive.
2. which symbols you're trying to plot the Open Interest for,
3. what is your data provider,
4. what is the actual problem behind "it doesn't work".
profile picture

lookingbackon

#3
Sorry for the insufficient details.

More details on the failure of these code:
1). The Open Interest pane (OPIPane) can be properly plotted ONLY with the following code:
CODE:
Please log in to see this code.

2). If the second part of the code added with purpose of ploting a Open Interstest Line (OPILine) in the above OPIPane , then the error exception is throwned upon implementing "Compile".
CODE:
Please log in to see this code.


For the questions you mentioned, the fact are as below:

1. Yes. The data(daily) contains an "Open Interest" series.
2. The symbols are futures data
3. The Data Provider is ASCII Files with .CSV files

Hopefully, these details are helpful to address the error.
Thanks
profile picture

Eugene

#4
CODE:
Please log in to see this code.

This syntax is incorrect. Please pay a visit to the Wiki for EMA on how to use EMA.Series properly. Just notice what is the compiler telling you and try to understand what line is problematic. It'd be the EMA line, not open interest.

P.S. The topic title "How to plot Open Interest?" has confused me. As you can see the problem has nothing to do with neither named series nor open interest. I've renamed the misleading topic title so other community members won't accidentally find it by searching for "open interest".
profile picture

lookingbackon

#5
If my understand is correct, according to the Wiki, only price series source can be used for the EMA calculation? Is Open Interest data series not applicable?

Actually, in addition to an open interest pane(which is similar to a Volume pane), what I want is a line which indicates the open interest value for specific bar. So that I may further us it like an indicator. Unfortunately, I failed to find the "OpenInterest" property in Bars Object (something like Bars.Volume ) or similar indicator in WealthScript.

Thus,My idea was to create a dataseries with the open interest value and further form it into a line with whatever 1day moving average, e.g.: EMA.

Could you check whether this is possible or not within WLD?
Thanks

profile picture

Eugene

#6
QUOTE:
If my understand is correct, according to the Wiki, only price series source can be used for the EMA calculation? Is Open Interest data series not applicable?

Of course it's applicable. Don't speculate, just carefully review the Syntax and Example blocks. Like I already said, your EMA syntax is incorrect: one parameter is missing. Your code line will not compile due to error and open interest has nothing to do with it.
profile picture

lookingbackon

#7
Thanks a lot. Yes, the calculationType param is missed. Also, the LineStyle property needs to be changed into .Solid.
Now It works as I want. Thanks again.
profile picture

Eugene

#8
Glad to have helped.