PureBytes Links
Trading Reference Links
|
Hi John,
By hang on I meant that the volatility has increased and a big move
is being made or about to be made. I have yet to find a way to make
sure I am on the right side of this move.
I meant to code it the same as in the "Street Smarts" book. Being
code challenged it seems you found my mistake. I also tried to
CutnPaste the code at the link you provided and couldn't make it
work. Here is the rest of the code that I have. It has been a while
since I looked at it and at the time I could not get the buys and
sells to plot correctly.
Maybe you can.
Plot( C, "Price", colorBlack, styleCandle );
Vol = StDev(log(C/Ref(C,-1)),6) / StDev(log(C/Ref(C,-1)),100);
NR4Day = (H - L) < Ref(LLV(H-L,3),-1);
Cond1 = Cross(Vol, 1.500);
Cond2 =(NR4Day == 1 OR Inside()) AND Cond1;
Buy=Cond2;
BuyPrice = ValueWhen(Buy,Ref(H,-1));
ShortPrice = ValueWhen(Buy,Ref(L,-1));
shape = BuyPrice * shapeUpArrow + ShortPrice * shapeDownArrow;
PlotShapes(shapeUpTriangle*BuyPrice,colorRed);
PlotShapes(shapeDownTriangle*ShortPrice,colorBlue);
Regards,
John
--- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
> Hi John,
>
> Thanks, John.
>
> When you say hang-on, what do you mean?
>
> Do you subscribe to the volatility-will-revert-to-the-mean theory?
> Thanks; as you probably know, rather than provide a single
volatility
> figure, your formula plots a ratio of the 7-period HV to the 101-
period HV
> and is similar to the one here:
>
> http://www.amibroker.com/library/detail.php?id=115
>
> In case anyone is interested, the Optionetics folks use an
_annualized_
> Historical/Statistical Volatility calculation, so it can be
compared against
> an annualized Implied Volatility. I am enclosing the Excel
spreadsheet I
> used to confirm the annualized calculations of in the Cajun5's 8
January
> 2004 8:55 post in this thread:
>
> http://tinyurl.com/yt6eu
>
> -john
> ----- Original Message -----
> From: "John" <jea55129@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, January 08, 2004 11:19 AM
> Subject: [amibroker] Re: Sammy Chua
>
>
> > John,
> >
> > Here is one that I use/
> >
> > Vol = StDev(log(C/Ref(C,-1)),6) / StDev(log(C/Ref(C,-1)),100);
> > Plot(Vol,"Vol",1,1);
> >
> > Custom scale=0 & 2.0
> > Show dates and Middle checked.
> > When it reaches 1.5 hang on.
> > John
> > -- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/
|