PureBytes Links
Trading Reference Links
|
Some ideas not knowing exactly what youıre trying to accomplish:
Try dividing n/Volatiilty instead of subtracting. May not be what you want,
but gives interesting plots with low values of Periods.
Add a StyleOwnScale to your last Plot statement, itıs going off scale on my
screen.
I have options volatility code that is nearly identical to your code, but it
uses 252 days instead of 365/7. Donıt know what youıre looking for exactly,
but remember AB only has trading days which would be 252 and not 365.
--
Terry
From: "Hans" <hansib@xxxxxxxxx>
Reply-To: amibroker@xxxxxxxxxxxxxxx
Date: Sat, 16 Oct 2004 06:30:15 -0000
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Adapt TEMA period to volatility - help
hello all,
I'm trying to code "inverse" relation to of any Average to Volatility.
I have some problems with this code, because it works "only" for
V1>28 (not precisely this level, this is a calculated value).
I really do not understand why it does not work for smaller values
since if I write them manually the code is working properly.
I hope anyone can suggest better code and possibly some general
parametrized method to calculate inverse relation from volatility to
averages periods.
Indicator code:
n=46; Period1=10;
n = Param("Periods",n,2,80,1);
Period1=Param("period 1",Period1,1,100,1);
Volatility1 = StDev(log(C/Ref(C,-1)),Period1)*sqrt(365/7)*100;
V1=int(n-Volatility1);
Var1= TEMA(Close,v1);
Plot(Volatility1,"Volatility1 [ "+WriteVal(period1,1.0)
+"]",colorRed,styleLine|styleOwnScale);
Plot(V1,"V1 [ "+WriteVal(V1,1.0)
+"]",colorGreen,styleLine|styleOwnScale);
Plot(Var1,"TEMA volatility" + "("+WriteVal( V1, 1.0 )+")",6,4);
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129uiuor6/M=315388.5500238.6578046.3001176/D=g
roups/S=1705632198:HM/EXP=1097994619/A=2372354/R=0/SIG=12id813k2/*https://ww
w.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS>
Yahoo! Groups Links
* To visit your group on the web, go to:
* http://groups.yahoo.com/group/amibroker/
*
* To unsubscribe from this group, send an email to:
* amibroker-unsubscribe@xxxxxxxxxxxxxxx
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
*
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|