[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: vix and dow on same chart



PureBytes Links

Trading Reference Links

Ron,
avoid complicated charts/codes.
You need a ^DJI chart and place on it the ^VIX conditions.
Let us look at the conditions statistics first:

There is no interesting statistics for both conditions.
a. The ^VIX high
Select the ^DJI and explore with
H1=Foreign("^VIX","H");
L1=Foreign("^VIX","L");
COND1=Ref(Ref(H1,-1)==HHV(H1,6),-1);
COND2=Ref(Ref(L1,-1)==LLV(L1,6),-1);
Filter= COND1;
AddColumn(COND2 AND ROC(C,1)>0,"");
AddColumn(COND2 AND ROC(C,1)<0,"");
b. The ^VIX low
H1=Foreign("^VIX","H");
L1=Foreign("^VIX","L");
COND1=Ref(Ref(H1,-1)==HHV(H1,6),-1);
COND2=Ref(Ref(L1,-1)==LLV(L1,6),-1);
Filter= COND2;
AddColumn(COND2 AND ROC(C,1)>0,"");
AddColumn(COND2 AND ROC(C,1)<0,"");

>From Jan2000 till now
121 times Filter=COND1;
64 times Filter=COND1 AND ROC(C,1)>0 ;
57 times Filter= COND1 AND ROC(C,1)<0;
and, FOR cond2
129 times  Filter=COND2;
79 times Filter=COND2 AND ROC(C,1)>0;
50 times Filter=COND2 AND ROC(C,1)<0;

For your indicator builder now, see the next ^DJI candle when a green
[cond2] or a red[cond1] candle appears, with the code
H1=Foreign("^VIX","H");
L1=Foreign("^VIX","L");
COND1=Ref(Ref(H1,-1)==HHV(H1,6),-1);
COND2=Ref(Ref(L1,-1)==LLV(L1,6),-1);
Plot(C,"C",Cond1*31+Cond2*42+1,64);

[It is necessary to have ^VIX and ^DJI in the same database]
The author of the article is dreaming of magic "simple" conditions, 
but, we are lucky enough to have an excellent statistical tool and 
check all these magic solutions...
Dimitris Tsokakis

--- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@xxxx> wrote:
> My son just read an article which said that on a day that the vix 
reaches its highest high of the last five days, and then is followed 
by a down day,  the DOW  will respond the next day by having an up 
day.  Then, on a day that the vix has a low that is the lowest low of 
the last five days, and then has an up day, the DOW will respond the 
next day by having a down day.    I have never yet tried to display 
two symbols in the same chart.  Below is the code he created for 
this.  I would sure appreciate it if someone could add the necessary 
coding that would allow viewing the candles of both the vix and the 
Dow on the same chart.  That way, when I rightclick on the results of 
this scan, I would be able to see just how often this happens.  I 
don't yet do explorations either.  Perhaps someone wants to make an 
exploration with the nesessary columns and statistical calculations 
in order to quantify  how valid this really is.  It could be one more 
handy thing to have as a trading tool if it happens a lot.  Ron D
> 
> 
> 
> 
> 
> Buy = Foreign("^vix","H",fixup = True) > Ref(Foreign
("^vix","H",fixup = True),-1) AND Foreign("^vix","H",fixup = True) > 
Ref(Foreign("^vix","H",fixup = True),-2) AND Foreign("^vix","H",fixup 
= True) > Ref(Foreign("^vix","H",fixup = True),-3) AND Foreign
("^vix","H",fixup = True) > Ref(Foreign("^vix","H",fixup = True),-4) 
AND Foreign("^vix","close",fixup = True) < Foreign
("^vix","open",fixup = True);
> 
> Sell = Foreign("^vix","l",fixup = True) < Ref(Foreign
("^vix","l",fixup = True),-1) AND Foreign("^vix","l",fixup = True) < 
Ref(Foreign("^vix","l",fixup = True),-2) AND Foreign("^vix","l",fixup 
= True) > Ref(Foreign("^vix","l",fixup = True),-3) AND Foreign
("^vix","l",fixup = True) < Ref(Foreign("^vix","l",fixup = True),-4) 
AND Foreign("^vix","close",fixup = True) > Foreign
("^vix","open",fixup = True);


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/