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

Re: [amibroker] Market Trend Indicator



PureBytes Links

Trading Reference Links

To determine which is higher (SPX or VIX) I think youšre going to have to
normalize the SPX and the VIX to some common value or index. You can use
RelStrength to do this. I donšt have a suggestion as to what to normalize to
since the usual candidate IS the SPX.
-- 
Terry


From: "Brian" <brian@xxxxxxxxxxxxxxxx>
Reply-To: amibroker@xxxxxxxxxxxxxxx
Date: Thu, 14 Oct 2004 23:55:11 -0000
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Market Trend Indicator


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";





Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Yahoo! Groups Sponsor
 
 ADVERTISEMENT
 <http://us.ard.yahoo.com/SIG=129eg3599/M=315388.5500238.6578046.3001176/D=g
roups/S=1705632198:HM/EXP=1097884517/A=2372354/R=0/SIG=12id813k2/*https://ww
w.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS>


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
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
*  
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]



------------------------ 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/