NexusFi: Find Your Edge


Home Menu

 





Thinkscript Volatility Indicator


Discussion in ThinkOrSwim

Updated
    1. trending_up 10,103 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Thinkscript Volatility Indicator

  #1 (permalink)
 tosmonkey 
Daly City, California, USA
 
Posts: 18 since Sep 2010

This is my first post, and I want to be useful and helpful.

I've taken a thinkscripter indicator and modified it slightly.

It's pretty simple - it gives unequivocal long and short signals.

I think it's pretty accurate as is, but can be improved upon.(I'm not a programmer.)

Cheers!


--------------------------------------------------------------------------------------------



declare lower;

input period = 22;

def WVF = (Highest(close, period) - low) / (Highest(close, period)) * 100;


input BBlength = 20;
input BBNum_Dev_Dn = -2.0;
input BBNum_Dev_up = 2.0;

def sDev = stdev(data = WVF, length = BBlength);
def MidLine = Average(data = WVF, length = BBlength);
def LowerBand = MidLine + BBnum_Dev_Dn * sDev;
def UpperBand = MidLine + BBnum_Dev_Up * sDev;


##################
def price = close;
def moses = 1- expaverage(price -wvf) ;

##################

plot golong = if((wvf <=lowerband and moses<=0), (1- moses), 0);
plot goshort = if(wvf >= upperband, (moses -1),0);
plot zero = 0;


golong.SetDefaultColor(color.cyan);
golong.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

goshort.SetDefaultColor(color.red);
goshort.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

addcloud(golong, zero);
addcloud(goshort, zero);

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Strategy stop orders partially filled
EasyLanguage Programming
 
  #3 (permalink)
 tosmonkey 
Daly City, California, USA
 
Posts: 18 since Sep 2010


The original is called the Williams Vix Fix and can be found at the thinkscripter website.

(I can't post links yet.)

Reply With Quote
  #4 (permalink)
 tosmonkey 
Daly City, California, USA
 
Posts: 18 since Sep 2010

This version does a pretty good job of indicating trend: --------------------------------------------
 
Code
                            
declare lower
input period 22;       
def WVF = (Highest(closeperiod) - low) / (Highest(closeperiod)) * 100
input BBlength 20input BBNum_Dev_Dn = -2.0
input BBNum_Dev_up 2.0;       
def sDev stdev(data WVFlength BBlength); 
def MidLine Average(data WVFlength BBlength); 
def LowerBand MidLine BBnum_Dev_Dn sDevdef UpperBand MidLine BBnum_Dev_Up sDev;          ##################     
def down1 upperband-wvf
def up1 =  wvf-lowerband;   plot down = if(down1>up1expaverage(down1), 0); 
plot up = if(up1>down1expaverage(up1), 0);  
down.SetDefaultColor(color.green); 
down.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); 
 
up.SetDefaultColor(color.red); up.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); 

Reply With Quote
  #5 (permalink)
 eensor 
New Braunfels, TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Zen-Fire
Trading: futures
Posts: 129 since Aug 2009
Thanks Given: 924
Thanks Received: 21


tosmonkey View Post
This is my first post, and I want to be useful and helpful.

I've taken a thinkscripter indicator and modified it slightly.

It's pretty simple - it gives unequivocal long and short signals.

I think it's pretty accurate as is, but can be improved upon.(I'm not a programmer.)

Cheers!


--------------------------------------------------------------------------------------------



declare lower;

input period = 22;

def WVF = (Highest(close, period) - low) / (Highest(close, period)) * 100;


input BBlength = 20;
input BBNum_Dev_Dn = -2.0;
input BBNum_Dev_up = 2.0;

def sDev = stdev(data = WVF, length = BBlength);
def MidLine = Average(data = WVF, length = BBlength);
def LowerBand = MidLine + BBnum_Dev_Dn * sDev;
def UpperBand = MidLine + BBnum_Dev_Up * sDev;


##################
def price = close;
def moses = 1- expaverage(price -wvf) ;

##################

plot golong = if((wvf <=lowerband and moses<=0), (1- moses), 0);
plot goshort = if(wvf >= upperband, (moses -1),0);
plot zero = 0;


golong.SetDefaultColor(color.cyan);
golong.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

goshort.SetDefaultColor(color.red);
goshort.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

addcloud(golong, zero);
addcloud(goshort, zero);


Has this indicator been programmed in NinjaTrader by anyone? If not would it be possible?

Thanks,
eensor

Reply With Quote




Last Updated on November 29, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts