Hi,
I have come across a specific problem where I am using a custom code with monthly data and displaying this monthly custom code calculation in a daily chart.
Here is the chart:
The right chart uses the following custom code script:
// Getting the CPI Core Index Data
Line1 = GETDATA(CODE=CPILFENS:FRED) ;
// Calculating the CPI Core Inflation
Line2 = (( Line1 / Line1[12] ) -1 ) * 100 ;
Line2
A variation of the script would be:
// Calculating the CPI Core Inflation
(( CPILFENS:FRED / CPILFENS:FRED[12] ) -1 ) * 100
Both scripts have the same results on the chart.
As you can see on the right chart the last displayed value of the green line is “3.24” although in the Info Panel the actual last value is “3.26”.
The chart on the left uses the same data BUT the green line is displayed using a Show View script.
Here is the Show View script:
// Getting the CPI Core Index Data
Line1 = GETDATA(CODE=CPILFENS:FRED) ;
// Calculating the CPI Core Inflation
Line2 = ((Line1 / Line1[12]) -1 ) * 100 ;
Line2
The left chart using the Show View script displays the last correct value of “3.26”.
So far so good! BUT when I use the Show View tool with the property “Show in Price Scale” the last price is highlighted on BOTH price scales (left and right price scales)!!! I don’t want that!
There are therefore two ways to solve the problem:
-
Is it possible to use the Show View script BUT highlighting the last price ONLY on the left price scale?
-
Is it possible to use the custom code script AND have the last price displayed on the chart?
I have uploaded the workbook for testing.
Thank you all very much.
Thomas
Monthly on Daily Chart.owb (42.5 KB)