PureBytes Links
Trading Reference Links
|
This is where I'm at with this indicator... (see below)...
It compares price action between the $SPX and $VIX to determine the
market trend at any given moment (this is primarily for hourly
trading). I would like the price line (varSPXPrice/varVIXPrice) bar
color to reflect more information than I have here.
Right now, I have a basic buy/sell color code for the price line. I
would like to make the price line colorBrightGreen when there's a buy
signal AND the $SPX is above the $VIX. Make it colorPink for the
reverse.
I'm not sure what the best way is to determine when one index is
higher or lower the other since they are using different scales. Any
ideas?
Thanks in advance,
Bman
/* Market Trend */
varSPX=Foreign("$SPX","C",1); // SP500 INDEX
varVIX=Foreign("$VIX","C",1); // SP500 VOLATILITY
VarSPXPrice = MA(varSPX,5);
VarVIXPrice = MA(varVIX,5);
VarBuy = VarSPXPrice>Ref(VarSPXPrice,-1) AND VarVIXPrice<Ref
(VarVIXPrice,-1);
VarShort = VarSPXPrice<Ref(VarSPXPrice,-1) AND VarVIXPrice>Ref
(VarVIXPrice,-1);
Plot((varSPXPrice/varVIXPrice),"",colorBlack,styleDots);
Graph0BarColor = IIf(VarBuy, colorGreen,
IIf(VarShort, colorRed, colorBlack));
Plot(VarSPXPrice,"",colorWhite,styleThick|styleOwnScale);
Plot(VarVIXPrice,"",colorBlack,styleThick|styleOwnScale);
Title = "MARKET TREND SPX";
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
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/
|