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

[amibroker] Re: Plotting letters in a chart



PureBytes Links

Trading Reference Links

These two indicators came out nicely... use them together to 
determine overall S&P500-related market conditions for helping to 
decide whether to go long or short on a trade. The two indicator 
symbols may be substituted with VXN.XO and COMPX.X for doing the 
same with tech stocks. May also use QQV.X and QQQ, and VXO.X and 
SPX.X (and others).

/*
SPX Long-Short IFT-RSI
// replace VIX.XO and SPX.X with your data feed's indicators
// SPX.X = S&P 500 Index
// VIX.XO = CBOE Volatility Index for S&P 500

// For use with related T3 Price Oscillator Crossover
*/

// General purpose Inverse Fisher Transform function

PlotGrid(0.5);
PlotGrid(-0.5);

SetForeign("VIX.XO");

function a_InvFisherTfm(array1)
{
a_e2y = exp(2*array1);
return(a_e2y-1)/(a_e2y+1);
}
a_Value1=0.1*(RSI(5)-50);
a_Value2=WMA(a_Value1,7);
//Plot(a_InvFisherTfm(a_Value2),"a_IFT-RSI",colorBlue,styleThick);

SetForeign("SPX.X");

function b_InvFisherTfm(array1)
{
b_e2y = exp(2*array1);
return(b_e2y-1)/(b_e2y+1);
}
b_Value1=0.1*(RSI(5)-50);
b_Value2=WMA(b_Value1,7);
//Plot(b_InvFisherTfm(b_Value2),"b_IFT-RSI",colorRed,styleThick);

VarPlotValue = WMA(b_Value2-a_value1,5);

Plot(b_InvFisherTfm(VarPlotValue/4),"SPX IFT-
RSI",colorRed,styleThick);

RestorePriceArrays();



/*
SPX Long-Short T3 Price Oscillator Crossover
// replace VIX.XO and SPX.X with your data feed's indicators
// SPX.X = S&P 500 Index
// VIX.XO = CBOE Volatility Index for S&P 500

// For use with related IFT-RSI
*/

SetForeign("VIX.XO");

function T3(price,periods,s)
{
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s^3;
c2=3*s^2*(1+s);
c3=-3*s*(1+s)^2;
c4=(1+s)^3;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
price=C;
s=0.8;
n1=3;n2=5;
T3fast=t3(price,n1,s);
T3slow=t3(price,n2,s);
OscPT3=100*(T3fast-T3slow)/T3slow;

SetForeign("SPX.X");

function b_T3(b_price,b_periods,b_s)
{
b_e1=EMA(b_price,b_periods);
b_e2=EMA(b_e1,b_Periods);
b_e3=EMA(b_e2,b_Periods);
b_e4=EMA(b_e3,b_Periods);
b_e5=EMA(b_e4,b_Periods);
b_e6=EMA(b_e5,b_Periods);
b_c1=-b_s^3;
b_c2=3*b_s^2*(1+b_s);
b_c3=-3*b_s*(1+b_s)^2;
b_c4=(1+b_s)^3;
b_Ti3=b_c1*b_e6+b_c2*b_e5+b_c3*b_e4+b_c4*b_e3;
return b_ti3;
}
b_price=C;
b_s=0.8;
b_n1=3;
b_n2=5;
b_T3fast=b_t3(b_price,b_n1,b_s);
b_T3slow=b_t3(b_price,b_n2,b_s);
b_OscPT3=100*(b_T3fast-b_T3slow)/b_T3slow;

c_OscPT3 = b_OscPT3-OscPT3;

Plot(c_OscPT3,"SPX T3",colorRed,styleThick,1);
Plot(EMA(c_OscPT3,7),"EMA7",colorBlue,1);
Plot(WMA(c_OscPT3,6),"WMA6",colorYellow,1);
Plot(DEMA(c_OscPT3,6),"DEMA6",colorGreen,1);

RestorePriceArrays();



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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 
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/