log in     sign up for free
 
Don't worry about what the markets are going to do, worry about what you are going to do in response to the markets.
Michael Carr
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Exponential Moving Average - BB Volatility Adjusted

Formula for: MetaStock

indicator


 

 

Views:  1671

Added: June 23, 2007
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: MetaStock, indicator
 
Your Ad Here
Bollinger Band volatility-adjusted, dynamic-period EMA with multiple output choice.

 

 



Code:

Exponential Moving Average - BB Volatility Adjusted

{ Bollinger Band volatility-adjusted,
dynamic-period EMA v1.1 }

{ Positive sensitivity:
EMA periodicity shortens on high BB volatility
- increases on low BB volatility }
{ Negative sensitivity:
EMA periodicity shortens on low BB volatility
- increases on high BB volatility }

{ [1]EMA: BB volatility-adjusted EMA }
{ [2]Dyn periods: EMA periodicity used }
{ [3]BB vlty: BB volatility 0~100% }
{ [4]Signals: EMA/price crossover signals }

{ ŠCopyright 2004 Jose Silva }
{ http://www.metastocktools.com }

pds:=Input("EMA avg periods",1,2520,21);
sens:=Input("BB volatility sensitivity (+100 to -100)%",-100,100,75)/100;
pdsVlty:=Input("BB volatility sampling periods",
2,2520,126);
pdsBB:=Input("Bollinger Band periods",
2,2520,10);
x:=Input("[1]Open [2]High [3]Low [4]Close [5]Vol [6]P",1,6,4);
plot:=Input("[1]EMA, [2]Dyn periods, [3]BB vlty, [4]Signals",1,4,1);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
y:=(BBandTop(x,pdsBB,S,2)-BBandBot(x,pdsBB,S,2))
/Mov(x,pdsBB,S);
BBvlty:=(y-LLV(y,pdsVlty))/(HHV(y,pdsVlty)
-LLV(y,pdsVlty)+.000001);
multi:=If(BBvlty<=.5,
10*Power(BBvlty,3.4739)+.1,
10*Power(BBvlty,3.32)+.000001);
multi:=If(sens>0,1/multi,multi);
multi:=If(multi<1,1-(1-multi)*Abs(sens),
(multi-1)*Abs(sens)+1);
pds:=pds*multi;
pds:=If(pds>Cum(IsDefined(x))-(pdsVlty+pdsBB),
Cum(IsDefined(x))-(pdsVlty+pdsBB),pds);
pds:=If(pds<1,1,pds);
BBema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
signals:=Cross(x,BBema)-Cross(BBema,x);

If(plot=2,pds,If(plot=3,BBvlty*100,
If(plot=4,signals,BBema)))


 






Author: Jose Silva
Source: http://www.metastocktools.com

 

View similar (indicator for MetaStock):

Lone Ranger
ZigZig Fixed
Tar(SZ)an
Year to Date Gain/Loss (Percent)
Calendar Week Counter
Wilson Relative Price Channel
Relative Volatility Index
Entry Price
Bell Ringer's StochRSI 14
Next Day's High & Low Price Target
...
 
 
all formulas for MetaStock
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012