Ok, I must have Internet back! Please Comcast, stop being lame.. I’ve been trading out of the local Starbucks, and Today I had the “pleasure” of spending about 40 minutes listening to two guys yapping about useless stuff ... aaaargh Need some quiet please
Back to trading, shutting down the Iron Butterflies, the OEX managed to make its Money this week, so getting ready to re-load next Tuesday. This is it for me, you all enjoy the weekend, I’ll catch up my new buddies Starbucks buddies...,,
Subscribe to:
Post Comments (Atom)
4 comments:
Hi Gustavo,
Please could you post the formulae for the 1 day & 5 day price spike. I want to get them coded into TOS so don't have to import into Excel every day.
The 1 day I think is correct (or near enough looking at the values you have) - see below but I am having trouble getting the 5 day price spike values near.
declare lower;
input length = 30;
def closeLog = Log(close[1] /close[2]);
def astd = stdev(closeLog, length) * Sqrt(length / (length -1));
def m = astd * close [1];
plot spike = (close[0]- close [1]) / m;
spike.setPaintingStrategy(paintingStrategy.HISTOGRAM);
spike. AssignValueColor(if close > close[1] then Color.UPTICK else if close < close[1] then Color.DOWNTICK else GetColor(1));
Hi there, I do not know exactly how to transfer the study into TOS programming code. One thing that it is worth noting is that what I'm doing is calculating historical volatility, not implied volatility, which I think that's what TOS uses.
In any event, I use excel spreadsheets, what I did was copy Jeff Augen's process. I did so about 2 years ago, so would have to spend quite an ammount of time to reverse engineer to explain, so my suggestion is to go to the source itself, Jeff's book:
http://www.amazon.com/Volatility-Edge-Options-Trading-Strategies/dp/0132354691/ref=sr_1_4?ie=UTF8&s=books&qid=1266261726&sr=8-4
Check it out next time you're in a bookstore, and the process will be there. I hope this helps,
Gustavo
Hi Gustavo,
To add the study into TOS charts is easy!
Charts > Edit Studies button (next to the wrench)then click New (bottom left). This brings up a new script box. Enter a new study name then copy and paste this:
declare lower;
input length = 30;
def closeLog = Log(close[1] /close[2]);
def astd = stdev(closeLog, length) * Sqrt(length / (length -1));
def m = astd * close [1];
plot spike = (close[0]- close [1]) / m;
spike.setPaintingStrategy(paintingStrategy.HISTOGRAM);
spike. AssignValueColor(if close > close[1] then Color.UPTICK else if close < close[1] then Color.DOWNTICK else GetColor(1));
plot zero = 0;
zero.setDefaultColor(color.black);
plot one = 1;
one.setDefaultColor(color.blue);
plot two = 2;
two.setDefaultColor(color.red);
plot three = -1;
three.setDefaultColor(color.blue);
plot four = -2;
four.setDefaultColor(color.red);
I added the lines for + /- 1 and 2 standard Deviations. This is perfect then for any underlying you look at for a 1 day price spike.
I am just having trouble with the 5 day - I have posted it on the think script site to see if anyone clever can help me out. Then we will have the VIPES studies automatically in TOS with importing into Excel!!
Nice! Thanks!
Gustavo
Post a Comment