Returns the real price as read from the data file. This can be different from the price used in scripting if the data has been negative adjusted.



If the data series had any negative values in it, the entire data series would be raised by the smallest factor or multiple of 10 possible. So if the most negative number was -.5 then the data series would be raised by 1.00.


If the data series was raised by 1.00, then the instrument.negativeAdjustment value would be 1.00, and the prices would be higher by 1.00 than the actual data file, and the prices in the chart.


So a close price of 54 would be represented as 55 in scripting, but charted as 54. To print the close price in real prices, use the instrument.RealPrice function. In this case the return value of instrument.RealPrice( 55 ) would be 54, since the function subtracts the instrument.negativeAdjustment value from the input price.



rPrice = RealPrice( price )





The price value to adjust.



' Print the real price for debugging
PRINT instrument.RealPrice( instrument.close )


Price returned removes the software's adjusted step so the price on the date for the current record is the value printed.



Data Functions

See Also:



Edit Time: 5/23/2017 8:40:42 AM

Topic ID#: 490


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software