PureBytes Links
Trading Reference Links
|
I have a simple script that calculates the correlation between two instruments. I then take the code we've been discussing for historical volatility, and try to plot the volatility of the correlation. However the second plot function of the volatility just shows a flat line at 0. Any ideas what I'm missing here?
t1 = Correlation( Foreign(instrument1, "Close"), Foreign(instrument2, "Close"), period1); Plot(t1, "Correlation", colorYellow);
hv1 = StDev(log(t1/Ref(t1,-1)),period1)*sqrt(260); Plot(hv1,"Volatility", colorWhite,styleLine|styleOwnScale);
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|