Traderji.com - Discussion forum for Stocks Commodities & Forex

Experiments in Technical Analysis

Discuss Experiments in Technical Analysis at the Technical Analysis within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hi Friends Because of the new restriction of the amount of uploaded images to 0.5 ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > METHODS & STRATEGIES > Technical Analysis

Notices

Technical Analysis Discussion of all the principles involved in technical analysis.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1251  
Old 20th May 2008, 12:59 AM
Moderator
 
Join Date: Jul 2005
Location: kuwait
Posts: 1,418
Blog Entries: 5
Thanks: 31
Thanked 367 Times in 68 Posts
karthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nice
Reputation: 448
Default Re: Experiments in Technical Analysis

Hi Friends

Because of the new restriction of the amount of uploaded images to 0.5 MB I am forced to deleted most of the charts and afl and codes from this thread. Of course without these this thread loses its value for new members who would prefer to read through the entire thread. In anybody requires any particular afl please do let me know and I will mail it.

regards

Karthik
Reply With Quote
  #1252  
Old 20th June 2008, 01:35 AM
Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Prophet is on a distinguished road
Reputation: 20
Post Re: Experiments in Technical Analysis

Quote:
Originally Posted by karthikmarar View Post
Hi Friends

Because of the new restriction of the amount of uploaded images to 0.5 MB I am forced to deleted most of the charts and afl and codes from this thread. Of course without these this thread loses its value for new members who would prefer to read through the entire thread. In anybody requires any particular afl please do let me know and I will mail it.

regards

Karthik
Hi Karthik,
This thread is huuuuuuuge
I was browsing thru
I am primarily interested in the afl/ms code/downloading stuff.
I would be extremely grateful if you could send me the code u have posted in this thread.
Perhaps you would be kind enuff to consolidate the code posted by you in this thread somewhere and post a link to that (ex. on 4shared or some other site)

Thanks in Advance.
Prophet.
Reply With Quote
  #1253  
Old 22nd June 2008, 01:29 PM
Moderator
 
Join Date: Jul 2005
Location: kuwait
Posts: 1,418
Blog Entries: 5
Thanks: 31
Thanked 367 Times in 68 Posts
karthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nice
Reputation: 448
Default Re: Experiments in Technical Analysis

Hi

Sure I will do... but need a little time. Once doen will post the links

regards

Karthik
Reply With Quote
  #1254  
Old 22nd June 2008, 01:59 PM
Moderator
 
Join Date: Nov 2005
Posts: 8,524
Thanks: 311
Thanked 555 Times in 238 Posts
uasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to all
Reputation: 627
Default Re: Experiments in Technical Analysis

karthik,

It will be a Gr8 loss for the Forum if you delete the afls ,plz do upload some where ,i have lost your threads Archive last time when i needed to Format my computer.
The Rapid share Link i had was also lost becoz of one month absence.

Asish
Reply With Quote
  #1255  
Old 8th July 2008, 10:19 PM
Member
 
Join Date: Jun 2008
Location: pune
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
yawalkar is on a distinguished road
Reputation: 10
Default Re: Experiments in Technical Analysis

I am using aptistock s/w.
I want to know how EOD data will be updated. From where did we get this data.
So pls. tell me about this procedure.

Thanks,
Ashish..
Reply With Quote
  #1256  
Old 8th July 2008, 10:57 PM
Member
 
Join Date: Jul 2005
Posts: 434
Thanks: 35
Thanked 39 Times in 23 Posts
kenneth will become famous soon enough
Reputation: 69
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by uasish View Post
karthik,

It will be a Gr8 loss for the Forum if you delete the afls ,plz do upload some where ,i have lost your threads Archive last time when i needed to Format my computer.
The Rapid share Link i had was also lost becoz of one month absence.

Asish
Asishda,

Please save them on a CD

KARTIKLS AFLS
1.
// AMA System by Karthikmarar
// Two adjustable parameter "Buy sensitivity" and "Buy Finetune" provided to adjust entry points.
// Two adjustable parameter "Sell sensitivity" and "Sell Finetune" provided to adjust Exit points.


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);


mYCOLOR=colorRed;
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 100, 1 );
Width = Param("Width%", 3, 0, 10, 0.05 );
MaPeriods = Param("MaPeriods", 7, 2, 14, 1 );
CL = MA( P, Periods );
Plot( CL, "MA" + _PARAM_VALUES(), colorRed, styleLine );
ET=(1 + Width * 0.01) * Cl;
EB=(1 - Width * 0.01) * Cl;
S=MA(C,MAperiods);
Plot(ET , "%EnvTop" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( EB, "%EnvBot" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( S, "MA" + _PARAM_VALUES(), colorOrange, styleLine );

Buy=BarsSince( Cross(s,ET))<20 AND Cross(C,HHV(Ref(H,-1),10))AND C>ET;
Sell=BarsSince( Cross (EB,s))<5 AND Cross(C,LLV(Ref(L,-1),10));
MYcolor = IIf( s>ET ,colorGreen, colorRed);
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}
_SECTION_END();
2.
EXOP
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);


mYCOLOR=colorRed;
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 100, 1 );
Width = Param("Width%", 3, 0, 10, 0.05 );
MaPeriods = Param("MaPeriods", 7, 2, 14, 1 );
CL = MA( P, Periods );
Plot( CL, "MA" + _PARAM_VALUES(), colorRed, styleLine );
ET=(1 + Width * 0.01) * Cl;
EB=(1 - Width * 0.01) * Cl;
S=MA(C,MAperiods);
Plot(ET , "%EnvTop" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( EB, "%EnvBot" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( S, "MA" + _PARAM_VALUES(), colorOrange, styleLine );

Buy=BarsSince( Cross(s,ET))<20 AND Cross(C,HHV(Ref(H,-1),10))AND C>ET;
Sell=BarsSince( Cross (EB,s))<5 AND Cross(C,LLV(Ref(L,-1),10));
MYcolor = IIf( s>ET ,colorGreen, colorRed);
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}




_SECTION_END();
3.
// KAMA System by Karthikmarar
// Two adjustable parameter "Buy sensitivity" and "Buy Finetune" provided to adjust entry points.
// Two adjustable parameter "Sell sensitivity" and "Sell Finetune" provided to adjust Exit points.

_SECTION_BEGIN("Filters"); // Volume & TurnOver Parameters
MyCL = Param( "Price Filter (Rs)", 50, 10, 100, 10 );
MyVK = Param( "Volume Filter (1000s)", 50, 10, 100, 10 );
MyTL = Param( "TurnOver Filter (Lakhs)", 300, 100, 1000, 100 );

TLM = EMA(Close*Volume/100000,100) ;
include= Close > MyCL AND ( (Volume/1000)> MyVK ) AND ( (Close*Volume/100000)> MyTL ) AND (TLM > 0.333 * MyTL) ;
_SECTION_END();

_SECTION_BEGIN("KAMA System");
/* Version 1.1
Modified on : 28-11-2006
Original Code : http://www.traderji.com/67020-post435.html
Reference material : http://trader.online.pl/ELZ/t-s-Adap...ge_System.html
*/

SetBarsRequired(10000, 10000);
SetChartOptions(0, chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC(C, 1 ) ) ));

// Buy Parameters
bPeriods = Param("BUY Sensitivity",8,2,20,1);
bF = Param("BUY Finetune",2,0.1,20,0.1);
// Sell Parameters
sPeriods = Param("SELL Sensitivity",2,2,20,1);
sF = Param("SELL Finetune",1,0.1,20,0.1);

// common
fast = 2/(2+1); // 0.666 // Fast end factor
slow = 2/(30+1); // 0.0645 // Slow end factor

//BUY part
bDir = abs( Close - Ref(Close, -bPeriods) ); // Signal:=abs(Pr-Ref(Pr,-Periods));
bVol = Sum( abs(Close - Ref(Close, -1)) , bPeriods); // Sum of Noise for the given period
bER = bDir/bVol; // EffRatio = If(Noise>0.,Signal/Noise,0.);

// FERatio = FEndF*EffRatio+SEndF*(1-EffRatio);
bSc = ( bER*(fast - slow) + slow )^2; // SmoothF = Power(FERatio,2))
bX = AMA( Close, bSc ); // AMA value

/* the Filter itself is based on the volatility
Filter = k * (change in Kama value)std dev
*/
bFilter = bF * StDev( bX - Ref(bX, -1), 20);
j = bX - Ref(bX, -3);

//SELL part
sDir = abs(Close-Ref(Close, -sPeriods));
sVol = Sum(abs( Close - Ref(Close, -1) ), sPeriods);
sER = sDir/sVol;
sSc = ( sER*(fast - slow) + slow)^2;
sX = AMA( Close, sSc );
sFilter= sF *StDev( sX - Ref(sX, -1), 20);
k = Ref(sX, -3) - sX;

/* BUY when the AMA turns up
and
SELL when it turns down */
Buy = Cross(j, bFilter) AND INCLUDE;
Sell = Cross(k, sFilter) ;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

/* Copied from AFL Example */
AASettings = Status("action");
if (AASettings == 1) {
// [Indicator]
GraphXSpace = 5;
mycolor = IIf(Close > bX, colorLime, colorRed);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow ;

Plot( bX, "kamaBuy", colorYellow, styleLine, 1);
Plot( sX, "kamaSell", colorBlue, styleLine, 1);
Plot( Close, "Close", mycolor, styleNoTitle | styleBar | styleThick );
PlotShapes( shape, IIf( Buy, colorGreen, colorYellow ),0, IIf( Buy, Low, High ) );

dist = 1.5*ATR(20);
for( i = 0; i < BarCount; i++ ) {
if( Buy[i] ) PlotText( "Buy\n@" + Close[i], i, Low[i] - dist[i], colorLime );
if( Sell[i] ) PlotText( "sell\n@" + Close[i], i, Low[i] + dist[i], colorYellow );
}

} else if (AASettings == 4) {
// [Exploration]
Filter = Buy OR Sell;
AddColumn(IIf(Buy,66,83),"Buy/Sell",formatChar,textcolor=IIf( Buy, colorGreen, IIf(Sell, colorRed, colorBlack)));
AddColumn(Close, "Close", 1.3);
AddColumn(High, "High", 1.3);
AddColumn(Volume, "Volume", 1);
AddColumn(ADX(14), "ADX", 1.4);
AddColumn(RSI(14), "RSI", 1.4);
AddColumn(MFI(14), "MFI", 1.4);

} else if (AASettings == 5) {
// [Backtest]
SetFormulaName("KAMA System");
SetTradeDelays(1, 1, 1, 1);
PositionScore =100/Close;
PositionSize = - 20; // 20% of Portfolio
}

_SECTION_END();

5.MABIUTS
_SECTION_BEGIN("MABIUTS");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Buy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,2,1));
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1), colorGreen, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorOrange ));

PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}

6 Mabiuts K S 1
_SECTION_BEGIN("MABIUTS");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Vp=Param("Min Volume",50000,10000,200000,10000);
Buy=V>Vp AND EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,5,1)) ;
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));

Short=EMA(C,13)<EMA(EMA(C,13),9) AND Cross (Trough(C,5,1),C) ;
Cover =Cross (EMA(C,13),EMA(EMA(C,13),9));// OR Cross (C,Peak(C,2,1)) ;
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);




MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1), colorLime, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorRed));

PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar|styleThick );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow + Short * shapeDownTriangle + Cover * shapeUpTriangle;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
if( Short[i] ) PlotText( "Short\n@" + C[ i ], i, H[ i ]+dist[i], colorYellow);
if( Cover[i] ) PlotText( "cover\n@" + C[ i ], i, H[ i ]+dist[i], colorBlue);

}

PositionScore=100/C;
PositionSize = - 20;
SetBarsRequired(10000, 10000);
SetFormulaName("MABIUTS System");

//SetTradeDelays(1, 1, 1, 1);


_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLavender ), styleNoTitle | ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick | styleNoLabel, maskHistogram ), 2 );

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

7.MACD
// TRADING THE MACD Ver 1.0 by Karthik Marar. AFL provided as a part of the Discussion on trading the MACD in the Thread " Experiments in Technical Analysis"
// Afl provided to learn and get an insight for trading using the MACD. The AFL can be freely distributed except for commercial purpose.

_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
r4 = Param( "Wk slow", 8, 2, 200, 1 );
r5 = Param( "Wk fast", 17, 2, 200, 1 );
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
GraphXSpace =20;

mycolor=IIf(m1<0 AND m1>s1, 51,IIf(m1>0 AND m1>s1,colorLime,IIf(m1>0 AND m1<s1,colorOrange,colorRed)));
Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), mycolor,ParamStyle("MACD style") );
Plot( s1 ,"Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
histcolor = IIf((m1-s1)-Ref((m1-s1),-1)> 0, colorLime, colorRed );

TimeFrameSet( inWeekly );
m1w=MACD(r4,r5);
s1w=Signal(r4,r5,r3);
kp=m1w-s1w;
kph=Ref(kp,-1);
TimeFrameRestore();

kw=TimeFrameExpand( kp, inWeekly ); // expand for display
khw=TimeFrameExpand( kph, inWeekly ); // expand for display
mw=TimeFrameExpand( m1w, inWeekly ); // expand for display
sw=TimeFrameExpand( s1w, inWeekly ); // expand for display

hcolor=IIf(mw<0 AND mw>sw, 51,IIf(mw>0 AND mw>sw,colorLime,IIf(mw>0 AND mw<sw,colorOrange,colorRed)));
gcolor=IIf(kw>khw,IIf(kw>0,colorDarkYellow,colorYe llow),IIf(kw>0,colorSkyblue,colorBlue));

Plot( 2,"Wkly MACD ribbon",hcolor,styleOwnScale|styleArea|styleNoLabe l, -0.5, 100 );
Plot( 2,"Ribbon",gcolor,styleOwnScale|styleArea|styleNoL abel, -0.4, 40 );

Plot( m1-s1, "MACD Histogram", mycolor, styleHistogram | styleThick| styleOwnScale );

_SECTION_END();

_SECTION_BEGIN("Signals");
//Zero crossover up

j1=Cross(m1,0);
PlotShapes(IIf(j1,shapeDigit1 ,Null),colorPaleGreen,0,Min(0,0),Min(0,0));
PlotShapes(IIf(j1,shapeUpArrow,Null),colorGreen,0, Min(0,0),-10);

// crossover above zero

j2=Cross(m1,s1) AND m1>0;
PlotShapes(IIf(j2,shapeDigit2 ,Null),colorYellow,0,0,0);
PlotShapes(IIf(j2,shapeUpArrow,Null),colorGreen,0, 0,-10);

//Zero crossover down

j3=Cross(s1,m1) AND m1>0;
PlotShapes(IIf(j3,shapeDigit3 ,Null),colorOrange,0,Min(0,0),0);
PlotShapes(IIf(j3,shapeDownArrow,Null),colorOrange ,0,Min(0,0),-10);

// crossover below zero

j4=Cross(0,m1);
PlotShapes(IIf(j4,shapeDigit4 ,Null),colorRed,0,0,0);
PlotShapes(IIf(j4,shapeDownArrow,Null),colorRed,0, 0,-10);

// Histogram peak and troughs
pt=m1-s1;
Tp = Ref(pT,-1) == HHV(pT,3);
Vl = Ref(pT,-1)==LLV(pT,3);
PlotShapes(IIf(Vl AND m1>s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),IIf(m1<0 ,colorYellow,colorLime),0,0,0);
PlotShapes(IIf(Tp AND m1<s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),colorRed,0,0,0);

//Zeroline reject bearish
zd=BarsSince(j1);
zlrd1=(zd<6 )AND j4;
PlotShapes(IIf(zlrd1,shapeStar+ shapePositionAbove,shapeNone),colorDarkRed,0,0,20) ;

//hooks bearish
Hu=BarsSince(j2);
Hu1=(Hu<6)AND j3;
PlotShapes(IIf(Hu1,shapeStar+ shapePositionAbove,shapeNone),colorRed,0,0,20);

//Zeroline reject Bullish
zu=BarsSince(j4);
zlru=zu<6 AND j1;
PlotShapes(IIf(zlru,shapeStar+ shapePositionAbove,shapeNone),colorPink,0,0,20);

//Hook Bullish
Hd=BarsSince(j3);
Hd1=Hd<6 AND j2;
PlotShapes(IIf(Hd1,shapeStar+ shapePositionAbove,shapeNone),colorLime,0,0,20);

//ADX related calculations
plus=EMA(PDI(14),3)>Ref(EMA(PDI(14),3),-5);
ap=EMA(ADX(14),3)>Ref(EMA(ADX(14),3),-5);
Minus=EMA(MDI(14),3)>Ref(EMA(MDI(14),3),-5);

//Power Dips - Bullish
PDIp=ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND ap AND Vl AND m1>s1 AND plus ;
PlotShapes(IIf(PDIp,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,0) ;

//power buys
pr2=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j2;
PlotShapes(IIf(pr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );

//Power Dips - Bearish
PDIm=ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND ap AND Tp AND m1<s1 AND Minus ;
PlotShapes(IIf(PDIm,shapeHollowCircle+ shapePositionAbove,shapeNone),colorWhite,0,0,0);

//Power shorts
sr2=ADX(14)>20 AND MDI(14)>20 AND ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND Minus AND j4;
PlotShapes(IIf(sr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorRed,0,0,-20);

//powerbuy2
pr2a=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j1;
PlotShapes(IIf(pr2a,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );
_SECTION_END();

_SECTION_BEGIN("Exploration");
Filter = j1 OR j2 OR j3 OR j4 OR PDIp OR PDIm OR pr2 OR sr2 ;

AddColumn(j1,"ZL UP",1);
AddColumn(J2,"MA Up",1);
AddColumn(j3,"MA DN",1);
AddColumn(J4,"ZL DN",1);
AddColumn(PDIp,"PDIP UP",1);
AddColumn(pr2,"PHK UP",1);
AddColumn(PDIm,"PDIP DN",1);
AddColumn(sr2,"PHk UP",1);
_SECTION_END();

_SECTION_BEGIN("Display the Signals");
Title = "Trading the MACD" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor() +

" - " + Date() +" - " +EncodeColor(colorLime)+ "MACD= "+WriteVal(m1)+"--"+EncodeColor(colorYellow)+
WriteIf (j1, " MACD Crossed above zero","")+
WriteIf (j2, " Bullish crossover above zero","")+
WriteIf (j4, " MACD Crossed below Zero","")+
WriteIf (j3, " Bearish crossover above zero","")+
WriteIf (PDIP, " Bullish Power Dip","")+
WriteIf (pr2, " & Power Buy","")+
WriteIf (sr2, " & Power Short","")+
WriteIf (PDIm, " Bearish Power Dip","")+
WriteIf (Hd1, " & Bullish Hook","")+
WriteIf (Hu1, " & Bearish Hook","")+
WriteIf (zlrd1, " & Bearish zeroline Reject","")+
WriteIf (zlru, " & Bullish Zeroline Reject","");
_SECTION_END();
8.PIVOT POINTS
_SECTION_BEGIN("Piviot Points");
Q=Param("% Change",2,1,10,1);
Z= Zig(C ,q ) ;
HH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(z,q,1 ) >Peak(Z,q,2)));
LH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(Z,q,1 ) <Peak(Z,q,2)));
HL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) >Trough(Z,q,2)));
LL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) <Trough(Z,q,2)));
GraphXSpace = 5;
dist = 0.5*ATR(20);

for( i = 0; i < BarCount; i++ )
{
if( HH[i] ) PlotText( "HH", i, H[ i ]+dist[i], colorYellow );
if( LH[i] ) PlotText( "LH", i, H[ i ]+dist[i], colorYellow );
if( HL[i] ) PlotText( "HL", i, L[ i ]-dist[i], colorPink );
if( LL[i] ) PlotText( "LL", i, L[ i ]-dist[i], colorPink );

}

_SECTION_END();
9. TRADING MACD
// TRADING THE MACD Ver 1.0 by Karthik Marar. AFL provided as a part of the Discussion on trading the MACD in the Thread " Experiments in Technical Analysis"
// Afl provided to learn and get an insight for trading using the MACD. The AFL can be freely distributed except for commercial purpose.

_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
r4 = Param( "Wk slow", 8, 2, 200, 1 );
r5 = Param( "Wk fast", 17, 2, 200, 1 );
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
GraphXSpace =20;
SetChartBkColor(colorGrey40);
mycolor=IIf(m1<0 AND m1>s1, 51,IIf(m1>0 AND m1>s1,colorLime,IIf(m1>0 AND m1<s1,colorOrange,colorAqua)));
Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), mycolor,ParamStyle("MACD style") );
Plot( s1 ,"Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
histcolor = IIf((m1-s1)-Ref((m1-s1),-1)> 0, colorLime, colorRed );

TimeFrameSet( inWeekly );
m1w=MACD(r4,r5);
s1w=Signal(r4,r5,r3);
kp=m1w-s1w;
kph=Ref(kp,-1);
TimeFrameRestore();

kw=TimeFrameExpand( kp, inWeekly ); // expand for display
khw=TimeFrameExpand( kph, inWeekly ); // expand for display
mw=TimeFrameExpand( m1w, inWeekly ); // expand for display
sw=TimeFrameExpand( s1w, inWeekly ); // expand for display

hcolor=IIf(mw<0 AND mw>sw, 51,IIf(mw>0 AND mw>sw,colorLime,IIf(mw>0 AND mw<sw,colorOrange,colorRed)));
gcolor=IIf(kw>khw,IIf(kw>0,colorDarkYellow,colorYe llow),IIf(kw>0,colorSkyblue,colorBlue));

Plot( 2,"Wkly MACD ribbon",hcolor,styleOwnScale|styleArea|styleNoLabe l, -0.5, 100 );
Plot( 2,"Ribbon",gcolor,styleOwnScale|styleArea|styleNoL abel, -0.4, 40,-0.6 );

Plot( m1-s1, "MACD Histogram", mycolor, styleHistogram | styleThick| styleOwnScale );

_SECTION_END();

_SECTION_BEGIN("Signals");
//Zero crossover up

j1=Cross(m1,0);
PlotShapes(IIf(j1,shapeDigit1 ,Null),colorPaleGreen,0,Min(0,0),Min(0,0));
PlotShapes(IIf(j1,shapeUpArrow,Null),colorGreen,0, Min(0,0),-10);

// crossover above zero

j2=Cross(m1,s1) AND m1>0;
PlotShapes(IIf(j2,shapeDigit2 ,Null),colorYellow,0,0,0);
PlotShapes(IIf(j2,shapeUpArrow,Null),colorGreen,0, 0,-10);

//Zero crossover down

j3=Cross(s1,m1) AND m1>0;
PlotShapes(IIf(j3,shapeDigit3 ,Null),colorOrange,0,Min(0,0),0);
PlotShapes(IIf(j3,shapeDownArrow,Null),colorOrange ,0,Min(0,0),-10);

// crossover below zero

j4=Cross(0,m1);
PlotShapes(IIf(j4,shapeDigit4 ,Null),colorRed,0,0,0);
PlotShapes(IIf(j4,shapeDownArrow,Null),colorRed,0, 0,-10);

// Histogram peak and troughs
pt=m1-s1;
Tp = Ref(pT,-1) == HHV(pT,3);
Vl = Ref(pT,-1)==LLV(pT,3);
PlotShapes(IIf(Vl AND m1>s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),IIf(m1<0 ,colorYellow,colorLime),0,0,0);
PlotShapes(IIf(Tp AND m1<s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),colorRed,0,0,0);

//Zeroline reject bearish
zd=BarsSince(j1);
zlrd1=(zd<6 )AND j4;
PlotShapes(IIf(zlrd1,shapeStar+ shapePositionAbove,shapeNone),colorDarkRed,0,0,20) ;

//hooks bearish
Hu=BarsSince(j2);
Hu1=(Hu<6)AND j3;
PlotShapes(IIf(Hu1,shapeStar+ shapePositionAbove,shapeNone),colorRed,0,0,20);

//Zeroline reject Bullish
zu=BarsSince(j4);
zlru=zu<6 AND j1;
PlotShapes(IIf(zlru,shapeStar+ shapePositionAbove,shapeNone),colorPink,0,0,20);

//Hook Bullish
Hd=BarsSince(j3);
Hd1=Hd<6 AND j2;
PlotShapes(IIf(Hd1,shapeStar+ shapePositionAbove,shapeNone),colorLime,0,0,20);

//ADX related calculations
plus=EMA(PDI(14),3)>Ref(EMA(PDI(14),3),-5);
ap=EMA(ADX(14),3)>Ref(EMA(ADX(14),3),-5);
Minus=EMA(MDI(14),3)>Ref(EMA(MDI(14),3),-5);

//Power Dips - Bullish
PDIp=ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND ap AND Vl AND m1>s1 AND plus ;
PlotShapes(IIf(PDIp,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,0) ;

//power buys
pr2=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j2;
PlotShapes(IIf(pr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );

//Power Dips - Bearish
PDIm=ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND ap AND Tp AND m1<s1 AND Minus ;
PlotShapes(IIf(PDIm,shapeHollowCircle+ shapePositionAbove,shapeNone),colorWhite,0,0,0);

//Power shorts
sr2=ADX(14)>20 AND MDI(14)>20 AND ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND Minus AND j4;
PlotShapes(IIf(sr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorRed,0,0,-20);

//powerbuy2
pr2a=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j1;
PlotShapes(IIf(pr2a,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );
_SECTION_END();

_SECTION_BEGIN("Exploration");
Filter = j1 OR j2 OR j3 OR j4 OR PDIp OR PDIm OR pr2 OR sr2 ;

AddColumn(j1,"ZL UP",1);
AddColumn(J2,"MA Up",1);
AddColumn(j3,"MA DN",1);
AddColumn(J4,"ZL DN",1);
AddColumn(PDIp,"PDIP UP",1);
AddColumn(pr2,"PHK UP",1);
AddColumn(PDIm,"PDIP DN",1);
AddColumn(sr2,"PHk UP",1);
_SECTION_END();

_SECTION_BEGIN("Display the Signals");
Title = "Trading the MACD" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor() +
" - " + Date() +" - " +EncodeColor(colorLime)+ "MACD= "+WriteVal(m1)+"--"+EncodeColor(colorYellow)+
WriteIf (j1, " MACD Crossed above zero","")+
WriteIf (j2, " Bullish crossover above zero","")+
WriteIf (j4, " MACD Crossed below Zero","")+
WriteIf (j3, " Bearish crossover above zero","")+
WriteIf (PDIP, " Bullish Power Dip","")+
WriteIf (pr2, " & Power Buy","")+
WriteIf (sr2, " & Power Short","")+
WriteIf (PDIm, " Bearish Power Dip","")+
WriteIf (Hd1, " & Bullish Hook","")+
WriteIf (Hu1, " & Bearish Hook","")+
WriteIf (zlrd1, " & Bearish zeroline Reject","")+
WriteIf (zlru, " & Bullish Zeroline Reject","");
_SECTION_END();

Regards
ken
Reply With Quote
  #1257  
Old 8th July 2008, 11:19 PM
Moderator
 
Join Date: Nov 2005
Posts: 8,524
Thanks: 311
Thanked 555 Times in 238 Posts
uasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to alluasish is a name known to all
Reputation: 627
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by kenneth View Post
Asishda,

Please save them on a CD

KARTIKLS AFLS
1.
// AMA System by Karthikmarar
// Two adjustable parameter "Buy sensitivity" and "Buy Finetune" provided to adjust entry points.
// Two adjustable parameter "Sell sensitivity" and "Sell Finetune" provided to adjust Exit points.


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);


mYCOLOR=colorRed;
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 100, 1 );
Width = Param("Width%", 3, 0, 10, 0.05 );
MaPeriods = Param("MaPeriods", 7, 2, 14, 1 );
CL = MA( P, Periods );
Plot( CL, "MA" + _PARAM_VALUES(), colorRed, styleLine );
ET=(1 + Width * 0.01) * Cl;
EB=(1 - Width * 0.01) * Cl;
S=MA(C,MAperiods);
Plot(ET , "%EnvTop" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( EB, "%EnvBot" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( S, "MA" + _PARAM_VALUES(), colorOrange, styleLine );

Buy=BarsSince( Cross(s,ET))<20 AND Cross(C,HHV(Ref(H,-1),10))AND C>ET;
Sell=BarsSince( Cross (EB,s))<5 AND Cross(C,LLV(Ref(L,-1),10));
MYcolor = IIf( s>ET ,colorGreen, colorRed);
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}
_SECTION_END();
2.
EXOP
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);


mYCOLOR=colorRed;
P = ParamField("Price field",-1);
Periods = Param("Periods", 50, 2, 100, 1 );
Width = Param("Width%", 3, 0, 10, 0.05 );
MaPeriods = Param("MaPeriods", 7, 2, 14, 1 );
CL = MA( P, Periods );
Plot( CL, "MA" + _PARAM_VALUES(), colorRed, styleLine );
ET=(1 + Width * 0.01) * Cl;
EB=(1 - Width * 0.01) * Cl;
S=MA(C,MAperiods);
Plot(ET , "%EnvTop" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( EB, "%EnvBot" + _PARAM_VALUES(), colorBlue, styleLine );
Plot( S, "MA" + _PARAM_VALUES(), colorOrange, styleLine );

Buy=BarsSince( Cross(s,ET))<20 AND Cross(C,HHV(Ref(H,-1),10))AND C>ET;
Sell=BarsSince( Cross (EB,s))<5 AND Cross(C,LLV(Ref(L,-1),10));
MYcolor = IIf( s>ET ,colorGreen, colorRed);
PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}




_SECTION_END();
3.
// KAMA System by Karthikmarar
// Two adjustable parameter "Buy sensitivity" and "Buy Finetune" provided to adjust entry points.
// Two adjustable parameter "Sell sensitivity" and "Sell Finetune" provided to adjust Exit points.

_SECTION_BEGIN("Filters"); // Volume & TurnOver Parameters
MyCL = Param( "Price Filter (Rs)", 50, 10, 100, 10 );
MyVK = Param( "Volume Filter (1000s)", 50, 10, 100, 10 );
MyTL = Param( "TurnOver Filter (Lakhs)", 300, 100, 1000, 100 );

TLM = EMA(Close*Volume/100000,100) ;
include= Close > MyCL AND ( (Volume/1000)> MyVK ) AND ( (Close*Volume/100000)> MyTL ) AND (TLM > 0.333 * MyTL) ;
_SECTION_END();

_SECTION_BEGIN("KAMA System");
/* Version 1.1
Modified on : 28-11-2006
Original Code : http://www.traderji.com/67020-post435.html
Reference material : http://trader.online.pl/ELZ/t-s-Adap...ge_System.html
*/

SetBarsRequired(10000, 10000);
SetChartOptions(0, chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC(C, 1 ) ) ));

// Buy Parameters
bPeriods = Param("BUY Sensitivity",8,2,20,1);
bF = Param("BUY Finetune",2,0.1,20,0.1);
// Sell Parameters
sPeriods = Param("SELL Sensitivity",2,2,20,1);
sF = Param("SELL Finetune",1,0.1,20,0.1);

// common
fast = 2/(2+1); // 0.666 // Fast end factor
slow = 2/(30+1); // 0.0645 // Slow end factor

//BUY part
bDir = abs( Close - Ref(Close, -bPeriods) ); // Signal:=abs(Pr-Ref(Pr,-Periods));
bVol = Sum( abs(Close - Ref(Close, -1)) , bPeriods); // Sum of Noise for the given period
bER = bDir/bVol; // EffRatio = If(Noise>0.,Signal/Noise,0.);

// FERatio = FEndF*EffRatio+SEndF*(1-EffRatio);
bSc = ( bER*(fast - slow) + slow )^2; // SmoothF = Power(FERatio,2))
bX = AMA( Close, bSc ); // AMA value

/* the Filter itself is based on the volatility
Filter = k * (change in Kama value)std dev
*/
bFilter = bF * StDev( bX - Ref(bX, -1), 20);
j = bX - Ref(bX, -3);

//SELL part
sDir = abs(Close-Ref(Close, -sPeriods));
sVol = Sum(abs( Close - Ref(Close, -1) ), sPeriods);
sER = sDir/sVol;
sSc = ( sER*(fast - slow) + slow)^2;
sX = AMA( Close, sSc );
sFilter= sF *StDev( sX - Ref(sX, -1), 20);
k = Ref(sX, -3) - sX;

/* BUY when the AMA turns up
and
SELL when it turns down */
Buy = Cross(j, bFilter) AND INCLUDE;
Sell = Cross(k, sFilter) ;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

/* Copied from AFL Example */
AASettings = Status("action");
if (AASettings == 1) {
// [Indicator]
GraphXSpace = 5;
mycolor = IIf(Close > bX, colorLime, colorRed);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow ;

Plot( bX, "kamaBuy", colorYellow, styleLine, 1);
Plot( sX, "kamaSell", colorBlue, styleLine, 1);
Plot( Close, "Close", mycolor, styleNoTitle | styleBar | styleThick );
PlotShapes( shape, IIf( Buy, colorGreen, colorYellow ),0, IIf( Buy, Low, High ) );

dist = 1.5*ATR(20);
for( i = 0; i < BarCount; i++ ) {
if( Buy[i] ) PlotText( "Buy\n@" + Close[i], i, Low[i] - dist[i], colorLime );
if( Sell[i] ) PlotText( "sell\n@" + Close[i], i, Low[i] + dist[i], colorYellow );
}

} else if (AASettings == 4) {
// [Exploration]
Filter = Buy OR Sell;
AddColumn(IIf(Buy,66,83),"Buy/Sell",formatChar,textcolor=IIf( Buy, colorGreen, IIf(Sell, colorRed, colorBlack)));
AddColumn(Close, "Close", 1.3);
AddColumn(High, "High", 1.3);
AddColumn(Volume, "Volume", 1);
AddColumn(ADX(14), "ADX", 1.4);
AddColumn(RSI(14), "RSI", 1.4);
AddColumn(MFI(14), "MFI", 1.4);

} else if (AASettings == 5) {
// [Backtest]
SetFormulaName("KAMA System");
SetTradeDelays(1, 1, 1, 1);
PositionScore =100/Close;
PositionSize = - 20; // 20% of Portfolio
}

_SECTION_END();

5.MABIUTS
_SECTION_BEGIN("MABIUTS");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Buy=EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,2,1));
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));
MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1), colorGreen, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorOrange ));

PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
}

6 Mabiuts K S 1
_SECTION_BEGIN("MABIUTS");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Vp=Param("Min Volume",50000,10000,200000,10000);
Buy=V>Vp AND EMA(C,13)>EMA(EMA(C,13),9) AND Cross (C,Peak(C,5,1)) ;
Sell=Cross (EMA(EMA(C,13),9),EMA(C,13));

Short=EMA(C,13)<EMA(EMA(C,13),9) AND Cross (Trough(C,5,1),C) ;
Cover =Cross (EMA(C,13),EMA(EMA(C,13),9));// OR Cross (C,Peak(C,2,1)) ;
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);




MYcolor = IIf( EMA(C,13)>EMA(EMA(C,13),9) AND C>Peak(C,2,1), colorLime, IIf(EMA(C,13)>EMA(EMA(C,13),9) AND C<Peak(C,2,1),colorBlue, colorRed));

PlotOHLC( Open, High, Low, Close, "", Mycolor, styleBar|styleThick );

shape = Buy * shapeUpArrow + Sell * shapeDownArrow + Short * shapeDownTriangle + Cover * shapeUpTriangle;


PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ) );

GraphXSpace = 5;
dist = 1.5*ATR(10);

for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed);
if( Short[i] ) PlotText( "Short\n@" + C[ i ], i, H[ i ]+dist[i], colorYellow);
if( Cover[i] ) PlotText( "cover\n@" + C[ i ], i, H[ i ]+dist[i], colorBlue);

}

PositionScore=100/C;
PositionSize = - 20;
SetBarsRequired(10000, 10000);
SetFormulaName("MABIUTS System");

//SetTradeDelays(1, 1, 1, 1);


_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLavender ), styleNoTitle | ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick | styleNoLabel, maskHistogram ), 2 );

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("EMA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

7.MACD
// TRADING THE MACD Ver 1.0 by Karthik Marar. AFL provided as a part of the Discussion on trading the MACD in the Thread " Experiments in Technical Analysis"
// Afl provided to learn and get an insight for trading using the MACD. The AFL can be freely distributed except for commercial purpose.

_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
r4 = Param( "Wk slow", 8, 2, 200, 1 );
r5 = Param( "Wk fast", 17, 2, 200, 1 );
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
GraphXSpace =20;

mycolor=IIf(m1<0 AND m1>s1, 51,IIf(m1>0 AND m1>s1,colorLime,IIf(m1>0 AND m1<s1,colorOrange,colorRed)));
Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), mycolor,ParamStyle("MACD style") );
Plot( s1 ,"Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
histcolor = IIf((m1-s1)-Ref((m1-s1),-1)> 0, colorLime, colorRed );

TimeFrameSet( inWeekly );
m1w=MACD(r4,r5);
s1w=Signal(r4,r5,r3);
kp=m1w-s1w;
kph=Ref(kp,-1);
TimeFrameRestore();

kw=TimeFrameExpand( kp, inWeekly ); // expand for display
khw=TimeFrameExpand( kph, inWeekly ); // expand for display
mw=TimeFrameExpand( m1w, inWeekly ); // expand for display
sw=TimeFrameExpand( s1w, inWeekly ); // expand for display

hcolor=IIf(mw<0 AND mw>sw, 51,IIf(mw>0 AND mw>sw,colorLime,IIf(mw>0 AND mw<sw,colorOrange,colorRed)));
gcolor=IIf(kw>khw,IIf(kw>0,colorDarkYellow,colorYe llow),IIf(kw>0,colorSkyblue,colorBlue));

Plot( 2,"Wkly MACD ribbon",hcolor,styleOwnScale|styleArea|styleNoLabe l, -0.5, 100 );
Plot( 2,"Ribbon",gcolor,styleOwnScale|styleArea|styleNoL abel, -0.4, 40 );

Plot( m1-s1, "MACD Histogram", mycolor, styleHistogram | styleThick| styleOwnScale );

_SECTION_END();

_SECTION_BEGIN("Signals");
//Zero crossover up

j1=Cross(m1,0);
PlotShapes(IIf(j1,shapeDigit1 ,Null),colorPaleGreen,0,Min(0,0),Min(0,0));
PlotShapes(IIf(j1,shapeUpArrow,Null),colorGreen,0, Min(0,0),-10);

// crossover above zero

j2=Cross(m1,s1) AND m1>0;
PlotShapes(IIf(j2,shapeDigit2 ,Null),colorYellow,0,0,0);
PlotShapes(IIf(j2,shapeUpArrow,Null),colorGreen,0, 0,-10);

//Zero crossover down

j3=Cross(s1,m1) AND m1>0;
PlotShapes(IIf(j3,shapeDigit3 ,Null),colorOrange,0,Min(0,0),0);
PlotShapes(IIf(j3,shapeDownArrow,Null),colorOrange ,0,Min(0,0),-10);

// crossover below zero

j4=Cross(0,m1);
PlotShapes(IIf(j4,shapeDigit4 ,Null),colorRed,0,0,0);
PlotShapes(IIf(j4,shapeDownArrow,Null),colorRed,0, 0,-10);

// Histogram peak and troughs
pt=m1-s1;
Tp = Ref(pT,-1) == HHV(pT,3);
Vl = Ref(pT,-1)==LLV(pT,3);
PlotShapes(IIf(Vl AND m1>s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),IIf(m1<0 ,colorYellow,colorLime),0,0,0);
PlotShapes(IIf(Tp AND m1<s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),colorRed,0,0,0);

//Zeroline reject bearish
zd=BarsSince(j1);
zlrd1=(zd<6 )AND j4;
PlotShapes(IIf(zlrd1,shapeStar+ shapePositionAbove,shapeNone),colorDarkRed,0,0,20) ;

//hooks bearish
Hu=BarsSince(j2);
Hu1=(Hu<6)AND j3;
PlotShapes(IIf(Hu1,shapeStar+ shapePositionAbove,shapeNone),colorRed,0,0,20);

//Zeroline reject Bullish
zu=BarsSince(j4);
zlru=zu<6 AND j1;
PlotShapes(IIf(zlru,shapeStar+ shapePositionAbove,shapeNone),colorPink,0,0,20);

//Hook Bullish
Hd=BarsSince(j3);
Hd1=Hd<6 AND j2;
PlotShapes(IIf(Hd1,shapeStar+ shapePositionAbove,shapeNone),colorLime,0,0,20);

//ADX related calculations
plus=EMA(PDI(14),3)>Ref(EMA(PDI(14),3),-5);
ap=EMA(ADX(14),3)>Ref(EMA(ADX(14),3),-5);
Minus=EMA(MDI(14),3)>Ref(EMA(MDI(14),3),-5);

//Power Dips - Bullish
PDIp=ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND ap AND Vl AND m1>s1 AND plus ;
PlotShapes(IIf(PDIp,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,0) ;

//power buys
pr2=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j2;
PlotShapes(IIf(pr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );

//Power Dips - Bearish
PDIm=ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND ap AND Tp AND m1<s1 AND Minus ;
PlotShapes(IIf(PDIm,shapeHollowCircle+ shapePositionAbove,shapeNone),colorWhite,0,0,0);

//Power shorts
sr2=ADX(14)>20 AND MDI(14)>20 AND ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND Minus AND j4;
PlotShapes(IIf(sr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorRed,0,0,-20);

//powerbuy2
pr2a=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j1;
PlotShapes(IIf(pr2a,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );
_SECTION_END();

_SECTION_BEGIN("Exploration");
Filter = j1 OR j2 OR j3 OR j4 OR PDIp OR PDIm OR pr2 OR sr2 ;

AddColumn(j1,"ZL UP",1);
AddColumn(J2,"MA Up",1);
AddColumn(j3,"MA DN",1);
AddColumn(J4,"ZL DN",1);
AddColumn(PDIp,"PDIP UP",1);
AddColumn(pr2,"PHK UP",1);
AddColumn(PDIm,"PDIP DN",1);
AddColumn(sr2,"PHk UP",1);
_SECTION_END();

_SECTION_BEGIN("Display the Signals");
Title = "Trading the MACD" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor() +

" - " + Date() +" - " +EncodeColor(colorLime)+ "MACD= "+WriteVal(m1)+"--"+EncodeColor(colorYellow)+
WriteIf (j1, " MACD Crossed above zero","")+
WriteIf (j2, " Bullish crossover above zero","")+
WriteIf (j4, " MACD Crossed below Zero","")+
WriteIf (j3, " Bearish crossover above zero","")+
WriteIf (PDIP, " Bullish Power Dip","")+
WriteIf (pr2, " & Power Buy","")+
WriteIf (sr2, " & Power Short","")+
WriteIf (PDIm, " Bearish Power Dip","")+
WriteIf (Hd1, " & Bullish Hook","")+
WriteIf (Hu1, " & Bearish Hook","")+
WriteIf (zlrd1, " & Bearish zeroline Reject","")+
WriteIf (zlru, " & Bullish Zeroline Reject","");
_SECTION_END();
8.PIVOT POINTS
_SECTION_BEGIN("Piviot Points");
Q=Param("% Change",2,1,10,1);
Z= Zig(C ,q ) ;
HH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(z,q,1 ) >Peak(Z,q,2)));
LH=((Z<Ref(Z,-1) AND Ref(Z,-1) > Ref(Z,-2)) AND (Peak(Z,q,1 ) <Peak(Z,q,2)));
HL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) >Trough(Z,q,2)));
LL=((Z>Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2)) AND (Trough(Z,q,1 ) <Trough(Z,q,2)));
GraphXSpace = 5;
dist = 0.5*ATR(20);

for( i = 0; i < BarCount; i++ )
{
if( HH[i] ) PlotText( "HH", i, H[ i ]+dist[i], colorYellow );
if( LH[i] ) PlotText( "LH", i, H[ i ]+dist[i], colorYellow );
if( HL[i] ) PlotText( "HL", i, L[ i ]-dist[i], colorPink );
if( LL[i] ) PlotText( "LL", i, L[ i ]-dist[i], colorPink );

}

_SECTION_END();
9. TRADING MACD
// TRADING THE MACD Ver 1.0 by Karthik Marar. AFL provided as a part of the Discussion on trading the MACD in the Thread " Experiments in Technical Analysis"
// Afl provided to learn and get an insight for trading using the MACD. The AFL can be freely distributed except for commercial purpose.

_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
r4 = Param( "Wk slow", 8, 2, 200, 1 );
r5 = Param( "Wk fast", 17, 2, 200, 1 );
m1=MACD(r1,r2);
s1=Signal(r1,r2,r3);
GraphXSpace =20;
SetChartBkColor(colorGrey40);
mycolor=IIf(m1<0 AND m1>s1, 51,IIf(m1>0 AND m1>s1,colorLime,IIf(m1>0 AND m1<s1,colorOrange,colorAqua)));
Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), mycolor,ParamStyle("MACD style") );
Plot( s1 ,"Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
histcolor = IIf((m1-s1)-Ref((m1-s1),-1)> 0, colorLime, colorRed );

TimeFrameSet( inWeekly );
m1w=MACD(r4,r5);
s1w=Signal(r4,r5,r3);
kp=m1w-s1w;
kph=Ref(kp,-1);
TimeFrameRestore();

kw=TimeFrameExpand( kp, inWeekly ); // expand for display
khw=TimeFrameExpand( kph, inWeekly ); // expand for display
mw=TimeFrameExpand( m1w, inWeekly ); // expand for display
sw=TimeFrameExpand( s1w, inWeekly ); // expand for display

hcolor=IIf(mw<0 AND mw>sw, 51,IIf(mw>0 AND mw>sw,colorLime,IIf(mw>0 AND mw<sw,colorOrange,colorRed)));
gcolor=IIf(kw>khw,IIf(kw>0,colorDarkYellow,colorYe llow),IIf(kw>0,colorSkyblue,colorBlue));

Plot( 2,"Wkly MACD ribbon",hcolor,styleOwnScale|styleArea|styleNoLabe l, -0.5, 100 );
Plot( 2,"Ribbon",gcolor,styleOwnScale|styleArea|styleNoL abel, -0.4, 40,-0.6 );

Plot( m1-s1, "MACD Histogram", mycolor, styleHistogram | styleThick| styleOwnScale );

_SECTION_END();

_SECTION_BEGIN("Signals");
//Zero crossover up

j1=Cross(m1,0);
PlotShapes(IIf(j1,shapeDigit1 ,Null),colorPaleGreen,0,Min(0,0),Min(0,0));
PlotShapes(IIf(j1,shapeUpArrow,Null),colorGreen,0, Min(0,0),-10);

// crossover above zero

j2=Cross(m1,s1) AND m1>0;
PlotShapes(IIf(j2,shapeDigit2 ,Null),colorYellow,0,0,0);
PlotShapes(IIf(j2,shapeUpArrow,Null),colorGreen,0, 0,-10);

//Zero crossover down

j3=Cross(s1,m1) AND m1>0;
PlotShapes(IIf(j3,shapeDigit3 ,Null),colorOrange,0,Min(0,0),0);
PlotShapes(IIf(j3,shapeDownArrow,Null),colorOrange ,0,Min(0,0),-10);

// crossover below zero

j4=Cross(0,m1);
PlotShapes(IIf(j4,shapeDigit4 ,Null),colorRed,0,0,0);
PlotShapes(IIf(j4,shapeDownArrow,Null),colorRed,0, 0,-10);

// Histogram peak and troughs
pt=m1-s1;
Tp = Ref(pT,-1) == HHV(pT,3);
Vl = Ref(pT,-1)==LLV(pT,3);
PlotShapes(IIf(Vl AND m1>s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),IIf(m1<0 ,colorYellow,colorLime),0,0,0);
PlotShapes(IIf(Tp AND m1<s1 ,shapeSmallCircle+ shapePositionAbove,shapeNone),colorRed,0,0,0);

//Zeroline reject bearish
zd=BarsSince(j1);
zlrd1=(zd<6 )AND j4;
PlotShapes(IIf(zlrd1,shapeStar+ shapePositionAbove,shapeNone),colorDarkRed,0,0,20) ;

//hooks bearish
Hu=BarsSince(j2);
Hu1=(Hu<6)AND j3;
PlotShapes(IIf(Hu1,shapeStar+ shapePositionAbove,shapeNone),colorRed,0,0,20);

//Zeroline reject Bullish
zu=BarsSince(j4);
zlru=zu<6 AND j1;
PlotShapes(IIf(zlru,shapeStar+ shapePositionAbove,shapeNone),colorPink,0,0,20);

//Hook Bullish
Hd=BarsSince(j3);
Hd1=Hd<6 AND j2;
PlotShapes(IIf(Hd1,shapeStar+ shapePositionAbove,shapeNone),colorLime,0,0,20);

//ADX related calculations
plus=EMA(PDI(14),3)>Ref(EMA(PDI(14),3),-5);
ap=EMA(ADX(14),3)>Ref(EMA(ADX(14),3),-5);
Minus=EMA(MDI(14),3)>Ref(EMA(MDI(14),3),-5);

//Power Dips - Bullish
PDIp=ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND ap AND Vl AND m1>s1 AND plus ;
PlotShapes(IIf(PDIp,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,0) ;

//power buys
pr2=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j2;
PlotShapes(IIf(pr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );

//Power Dips - Bearish
PDIm=ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND ap AND Tp AND m1<s1 AND Minus ;
PlotShapes(IIf(PDIm,shapeHollowCircle+ shapePositionAbove,shapeNone),colorWhite,0,0,0);

//Power shorts
sr2=ADX(14)>20 AND MDI(14)>20 AND ADX(14)>PDI(14) AND MDI(14)>PDI(14) AND Minus AND j4;
PlotShapes(IIf(sr2,shapeHollowCircle+ shapePositionAbove,shapeNone),colorRed,0,0,-20);

//powerbuy2
pr2a=ADX(14)>20 AND PDI(14)>20 AND ADX(14)>MDI(14) AND PDI(14)>MDI(14) AND plus AND j1;
PlotShapes(IIf(pr2a,shapeHollowCircle+ shapePositionAbove,shapeNone),colorCustom12,0,0,20 );
_SECTION_END();

_SECTION_BEGIN("Exploration");
Filter = j1 OR j2 OR j3 OR j4 OR PDIp OR PDIm OR pr2 OR sr2 ;

AddColumn(j1,"ZL UP",1);
AddColumn(J2,"MA Up",1);
AddColumn(j3,"MA DN",1);
AddColumn(J4,"ZL DN",1);
AddColumn(PDIp,"PDIP UP",1);
AddColumn(pr2,"PHK UP",1);
AddColumn(PDIm,"PDIP DN",1);
AddColumn(sr2,"PHk UP",1);
_SECTION_END();

_SECTION_BEGIN("Display the Signals");
Title = "Trading the MACD" + " - " + Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor() +
" - " + Date() +" - " +EncodeColor(colorLime)+ "MACD= "+WriteVal(m1)+"--"+EncodeColor(colorYellow)+
WriteIf (j1, " MACD Crossed above zero","")+
WriteIf (j2, " Bullish crossover above zero","")+
WriteIf (j4, " MACD Crossed below Zero","")+
WriteIf (j3, " Bearish crossover above zero","")+
WriteIf (PDIP, " Bullish Power Dip","")+
WriteIf (pr2, " & Power Buy","")+
WriteIf (sr2, " & Power Short","")+
WriteIf (PDIm, " Bearish Power Dip","")+
WriteIf (Hd1, " & Bullish Hook","")+
WriteIf (Hu1, " & Bearish Hook","")+
WriteIf (zlrd1, " & Bearish zeroline Reject","")+
WriteIf (zlru, " & Bullish Zeroline Reject","");
_SECTION_END();

Regards
ken

Thks,will do as suggested.
Reply With Quote
  #1258  
Old 11th July 2008, 09:59 PM
Moderator
 
Join Date: Jul 2005
Location: kuwait
Posts: 1,418
Blog Entries: 5
Thanks: 31
Thanked 367 Times in 68 Posts
karthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nicekarthikmarar is just really nice
Reputation: 448
Default Re: Experiments in Technical Analysis

Ken

Thanks a lot. I was palnning to post everything on a shared folder, but could not due lack of time. Hope fully I will be able to post the full collection of the discussions and afls.

regards

Karthik
Reply With Quote
  #1259  
Old 11th July 2008, 10:09 PM
Member
 
Join Date: Feb 2008
Posts: 955
Thanks: 328
Thanked 30 Times in 22 Posts
deb99891 will become famous soon enough
Reputation: 82
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by karthikmarar View Post
Ken

Thanks a lot. I was palnning to post everything on a shared folder, but could not due lack of time. Hope fully I will be able to post the full collection of the discussions and afls.

regards

Karthik
sir
eagerly waiting
regards
deb
Reply With Quote
  #1260  
Old 12th July 2008, 01:06 PM
Member
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
mcid28a is on a distinguished road
Reputation: 10
Default Experiments in Technical Analysis

Will anyone tell me how Fcharts calculate RSI (9 or 14). I used the formula obtained from www.stockcharts.com. But the result did not match with that I got from Fcharts. I used the same data in both. Please help me.

Thanks in advance,

Peter (mcid28a@ya hoo.com)


DATA
-----------------------------------
"SCRIP","DATE","OPEN","HIGH","LOW","CLOSE"
"ASHOKLEY",12/07/2005,25.7,25.7,24.9,25.3
"ASHOKLEY",13/07/2005,25.4,25.45,24.5,24.95
"ASHOKLEY",14/07/2005,25.3,25.4,24.5,25.1
"ASHOKLEY",15/07/2005,25.4,25.75,25.1,25.6
"ASHOKLEY",18/07/2005,25,27.9,25,27.65
"ASHOKLEY",19/07/2005,28.4,28.6,27,27.75
"ASHOKLEY",20/07/2005,28,28.1,27.45,27.65
"ASHOKLEY",21/07/2005,27.95,28.2,26.8,27.3
"ASHOKLEY",22/07/2005,27,27.7,26.85,27.15
"ASHOKLEY",25/07/2005,27.25,28,27.25,27.6
"ASHOKLEY",26/07/2005,27.7,28.4,27.55,27.8
"ASHOKLEY",27/07/2005,29,29.25,27.9,28.1
"ASHOKLEY",29/07/2005,27.3,29.95,27.3,29.45
"ASHOKLEY",01/08/2005,29.85,31,29,30.85
"ASHOKLEY",02/08/2005,31.1,31.7,30.05,30.6
"ASHOKLEY",03/08/2005,30.85,31.1,29.7,30.05
"ASHOKLEY",04/08/2005,30.9,30.9,29.75,29.95
"ASHOKLEY",05/08/2005,30.1,30.5,29.2,29.4
"ASHOKLEY",08/08/2005,29.6,30.1,28.25,28.4
"ASHOKLEY",09/08/2005,28.4,28.75,27.25,27.9
"ASHOKLEY",10/08/2005,28,28.75,28,28.55
"ASHOKLEY",11/08/2005,29,29.55,28.65,29.2
"ASHOKLEY",12/08/2005,29.3,29.45,28.25,28.4
"ASHOKLEY",16/08/2005,28.5,28.7,28.1,28.15
"ASHOKLEY",17/08/2005,28.3,28.65,28,28.25
"ASHOKLEY",18/08/2005,28.55,28.8,28.1,28.35
"ASHOKLEY",19/08/2005,29.15,29.15,28,28.2
"ASHOKLEY",22/08/2005,28.5,28.5,27.5,27.7
"ASHOKLEY",23/08/2005,27.7,27.9,26.95,27
"ASHOKLEY",24/08/2005,27.05,27.1,25.7,26.35
"ASHOKLEY",25/08/2005,26.5,26.5,26,26.15
"ASHOKLEY",26/08/2005,26.55,28,26.35,27.8
"ASHOKLEY",29/08/2005,27.9,28,26.9,27.7
"ASHOKLEY",30/08/2005,27.9,28.05,27.6,27.7
"ASHOKLEY",31/08/2005,27.85,28.9,27.7,28.75
"ASHOKLEY",01/09/2005,29.4,29.6,28.65,28.85
"ASHOKLEY",02/09/2005,29,29.5,28.9,29.2
"ASHOKLEY",05/09/2005,29.2,29.5,28.9,29.05
"ASHOKLEY",06/09/2005,29.05,29.05,28.45,28.85
"ASHOKLEY",08/09/2005,29.4,29.4,28.8,29.2
"ASHOKLEY",09/09/2005,29.2,29.55,28.8,29.1
"ASHOKLEY",12/09/2005,29.3,29.85,29.15,29.75
"ASHOKLEY",13/09/2005,30.1,30.45,29.75,30.25
"ASHOKLEY",14/09/2005,30.5,30.5,28.9,29.45
"ASHOKLEY",15/09/2005,29.45,30.25,29.45,30.2
"ASHOKLEY",16/09/2005,30.2,30.85,29.8,29.9
"ASHOKLEY",19/09/2005,30.4,30.4,29.8,29.85
"ASHOKLEY",20/09/2005,29.85,29.95,29.1,29.25
"ASHOKLEY",21/09/2005,29.65,29.65,27,28.65
"ASHOKLEY",22/09/2005,28.65,28.65,26.75,27
"ASHOKLEY",23/09/2005,27.1,27.8,26.5,27.2
"ASHOKLEY",26/09/2005,27.2,28.2,27.2,28.1
"ASHOKLEY",27/09/2005,28.25,28.75,28.05,28.6
"ASHOKLEY",28/09/2005,29,29.1,28.4,28.45
"ASHOKLEY",29/09/2005,28.7,28.75,28.25,28.35
"ASHOKLEY",30/09/2005,28.7,28.95,27.6,28.4
"ASHOKLEY",03/10/2005,28.7,29.45,28.3,29.2
"ASHOKLEY",04/10/2005,28.4,29.75,28.4,29.6
"ASHOKLEY",05/10/2005,29.7,29.7,29,29.4
"ASHOKLEY",06/10/2005,29.1,29.2,28.1,28.25
"ASHOKLEY",07/10/2005,28.3,29.15,28,28.95
"ASHOKLEY",10/10/2005,29.4,29.45,28.5,28.6
"ASHOKLEY",11/10/2005,28.75,28.9,27.7,28.35
"ASHOKLEY",13/10/2005,28.5,29,28.15,28.4
"ASHOKLEY",14/10/2005,28.4,28.6,27.8,27.9
"ASHOKLEY",17/10/2005,28.15,28.15,27.25,27.8
"ASHOKLEY",18/10/2005,27.8,28.45,27.65,27.95
"ASHOKLEY",19/10/2005,27.65,27.75,26.95,27.1
"ASHOKLEY",20/10/2005,27.5,29.25,25.85,26.15
"ASHOKLEY",21/10/2005,27,27.7,25.2,27.3
"ASHOKLEY",24/10/2005,28.5,29.1,28,28.1
"ASHOKLEY",25/10/2005,28.4,28.85,28.15,28.55
"ASHOKLEY",26/10/2005,28.6,28.7,28.1,28.2
"ASHOKLEY",27/10/2005,28.5,28.8,27.05,27.15
"ASHOKLEY",28/10/2005,27.7,27.8,26.4,26.5
"ASHOKLEY",31/10/2005,26.5,27.65,26.5,27.5
"ASHOKLEY",01/11/2005,28,28.5,27.75,27.95
"ASHOKLEY",02/11/2005,28,28.1,27.25,28
"ASHOKLEY",07/11/2005,28.25,28.6,27.9,28.4
"ASHOKLEY",08/11/2005,28.4,29.45,28.25,28.9
"ASHOKLEY",09/11/2005,29.15,29.3,28.3,28.85
"ASHOKLEY",10/11/2005,29.05,29.2,27.65,28
"ASHOKLEY",11/11/2005,28.4,28.75,28.25,28.55
"ASHOKLEY",14/11/2005,28.75,29,28.4,28.7
"ASHOKLEY",16/11/2005,28.85,29.75,28.55,29.5
"ASHOKLEY",17/11/2005,29.8,31.25,29.7,31.05
"ASHOKLEY",18/11/2005,35,35,31.05,31.55
"ASHOKLEY",21/11/2005,32.05,32.35,31.45,31.65
"ASHOKLEY",22/11/2005,30.85,31.95,30.7,30.95
"ASHOKLEY",23/11/2005,31,31.45,30.55,30.9
"ASHOKLEY",24/11/2005,31,32.25,31,31.95
"ASHOKLEY",25/11/2005,32.5,32.7,32.1,32.35
"ASHOKLEY",26/11/2005,32.5,32.65,32.15,32.4
"ASHOKLEY",28/11/2005,32.6,33,32.3,32.75
"ASHOKLEY",29/11/2005,32.1,33,32,32.2
"ASHOKLEY",30/11/2005,32.1,32.65,31.1,31.25
"ASHOKLEY",01/12/2005,31.45,32.25,31,32.05
"ASHOKLEY",02/12/2005,32.45,32.45,31.3,31.55
"ASHOKLEY",05/12/2005,31.8,31.8,31.15,31.35
"ASHOKLEY",06/12/2005,31.5,32,31.05,31.5
"ASHOKLEY",07/12/2005,31.8,32.25,31.45,31.65
"ASHOKLEY",08/12/2005,31.75,32.95,31.6,32.75
"ASHOKLEY",09/12/2005,32.5,33,32.25,32.65
"ASHOKLEY",12/12/2005,32.5,32.8,32.1,32.25
"ASHOKLEY",13/12/2005,32.55,32.75,32.15,32.35
"ASHOKLEY",14/12/2005,32.45,33.5,32.4,33.25
"ASHOKLEY",15/12/2005,33.35,33.8,32.5,32.9
"ASHOKLEY",16/12/2005,32.95,33.4,32.6,33.25
"ASHOKLEY",19/12/2005,33.75,33.75,32.65,32.85
"ASHOKLEY",20/12/2005,33.15,33.15,32.35,32.6
"ASHOKLEY",21/12/2005,32.6,33.2,32.2,32.45
"ASHOKLEY",22/12/2005,32.5,32.65,32.1,32.4
"ASHOKLEY",23/12/2005,32.05,32.8,31.2,31.4
"ASHOKLEY",26/12/2005,31.7,31.7,29.9,30.15
"ASHOKLEY",27/12/2005,30.4,31.5,30.2,31.4
"ASHOKLEY",28/12/2005,31.5,31.7,31,31.1
"ASHOKLEY",29/12/2005,31.2,31.7,31,31.45
"ASHOKLEY",30/12/2005,31.75,32.15,31.3,31.85



Result of Fcharts-(RSI 14)
------------------
ASHOKLEY,12/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,13/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,14/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,15/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,18/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,19/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,20/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,21/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,22/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,25/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,26/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,27/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,29/07/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,01/08/2005,RSI:,0.0,MARSI:,0.0
ASHOKLEY,02/08/2005,RSI:,88.43,MARSI:,88.43
ASHOKLEY,03/08/2005,RSI:,81.93,MARSI:,87.13
ASHOKLEY,04/08/2005,RSI:,79.59,MARSI:,85.63
ASHOKLEY,05/08/2005,RSI:,64.96,MARSI:,81.49
ASHOKLEY,08/08/2005,RSI:,54.81,MARSI:,76.16
ASHOKLEY,09/08/2005,RSI:,51.75,MARSI:,71.27
ASHOKLEY,10/08/2005,RSI:,58.39,MARSI:,68.70
ASHOKLEY,11/08/2005,RSI:,62.89,MARSI:,67.54
ASHOKLEY,12/08/2005,RSI:,54.82,MARSI:,64.99
ASHOKLEY,16/08/2005,RSI:,52.10,MARSI:,62.41
ASHOKLEY,17/08/2005,RSI:,50.92,MARSI:,60.11
ASHOKLEY,18/08/2005,RSI:,42.03,MARSI:,56.50
ASHOKLEY,19/08/2005,RSI:,26.55,MARSI:,50.51
ASHOKLEY,22/08/2005,RSI:,25.42,MARSI:,45.49
ASHOKLEY,23/08/2005,RSI:,24.79,MARSI:,41.35
ASHOKLEY,24/08/2005,RSI:,22.73,MARSI:,37.63
ASHOKLEY,25/08/2005,RSI:,24.00,MARSI:,34.90
ASHOKLEY,26/08/2005,RSI:,45.65,MARSI:,37.05
ASHOKLEY,29/08/2005,RSI:,48.46,MARSI:,39.33
ASHOKLEY,30/08/2005,RSI:,42.73,MARSI:,40.01
ASHOKLEY,31/08/2005,RSI:,46.40,MARSI:,41.29
ASHOKLEY,01/09/2005,RSI:,54.05,MARSI:,43.84
ASHOKLEY,02/09/2005,RSI:,59.29,MARSI:,46.93
ASHOKLEY,05/09/2005,RSI:,57.02,MARSI:,48.95
ASHOKLEY,06/09/2005,RSI:,54.31,MARSI:,50.02
ASHOKLEY,08/09/2005,RSI:,58.33,MARSI:,51.68
ASHOKLEY,09/09/2005,RSI:,62.50,MARSI:,53.85
ASHOKLEY,12/09/2005,RSI:,74.77,MARSI:,58.03
ASHOKLEY,13/09/2005,RSI:,86.11,MARSI:,63.65
ASHOKLEY,14/09/2005,RSI:,77.50,MARSI:,66.42
ASHOKLEY,15/09/2005,RSI:,73.53,MARSI:,67.84
ASHOKLEY,16/09/2005,RSI:,70.75,MARSI:,68.42
ASHOKLEY,19/09/2005,RSI:,70.09,MARSI:,68.76
ASHOKLEY,20/09/2005,RSI:,55.10,MARSI:,66.03
ASHOKLEY,21/09/2005,RSI:,48.15,MARSI:,62.45
ASHOKLEY,22/09/2005,RSI:,33.58,MARSI:,56.68
ASHOKLEY,23/09/2005,RSI:,36.30,MARSI:,52.60
ASHOKLEY,26/09/2005,RSI:,44.97,MARSI:,51.07
ASHOKLEY,27/09/2005,RSI:,46.05,MARSI:,50.07
ASHOKLEY,28/09/2005,RSI:,45.75,MARSI:,49.21
ASHOKLEY,29/09/2005,RSI:,40.14,MARSI:,47.39
ASHOKLEY,30/09/2005,RSI:,36.09,MARSI:,45.13
ASHOKLEY,03/10/2005,RSI:,48.12,MARSI:,45.73
ASHOKLEY,04/10/2005,RSI:,45.24,MARSI:,45.63
ASHOKLEY,05/10/2005,RSI:,45.97,MARSI:,45.70
ASHOKLEY,06/10/2005,RSI:,39.04,MARSI:,44.37
ASHOKLEY,07/10/2005,RSI:,47.97,MARSI:,45.09
ASHOKLEY,10/10/2005,RSI:,49.65,MARSI:,46.00
ASHOKLEY,11/10/2005,RSI:,61.74,MARSI:,49.15
ASHOKLEY,13/10/2005,RSI:,60.71,MARSI:,51.46
ASHOKLEY,14/10/2005,RSI:,48.08,MARSI:,50.78
ASHOKLEY,17/10/2005,RSI:,41.67,MARSI:,48.96
ASHOKLEY,18/10/2005,RSI:,44.79,MARSI:,48.13
ASHOKLEY,19/10/2005,RSI:,38.74,MARSI:,46.25
ASHOKLEY,20/10/2005,RSI:,32.56,MARSI:,43.51
ASHOKLEY,21/10/2005,RSI:,36.03,MARSI:,42.01
ASHOKLEY,24/10/2005,RSI:,39.58,MARSI:,41.53
ASHOKLEY,25/10/2005,RSI:,44.29,MARSI:,42.08
ASHOKLEY,26/10/2005,RSI:,49.62,MARSI:,43.59
ASHOKLEY,27/10/2005,RSI:,37.14,MARSI:,42.30
ASHOKLEY,28/10/2005,RSI:,35.62,MARSI:,40.96
ASHOKLEY,31/10/2005,RSI:,44.72,MARSI:,41.71
ASHOKLEY,01/11/2005,RSI:,47.34,MARSI:,42.84
ASHOKLEY,02/11/2005,RSI:,50.62,MARSI:,44.40
ASHOKLEY,07/11/2005,RSI:,53.61,MARSI:,46.24
ASHOKLEY,08/11/2005,RSI:,55.49,MARSI:,48.09
ASHOKLEY,09/11/2005,RSI:,61.15,MARSI:,50.70
ASHOKLEY,10/11/2005,RSI:,61.93,MARSI:,52.95
ASHOKLEY,11/11/2005,RSI:,58.74,MARSI:,54.11
ASHOKLEY,14/11/2005,RSI:,54.61,MARSI:,54.21
ASHOKLEY,16/11/2005,RSI:,56.93,MARSI:,54.75
ASHOKLEY,17/11/2005,RSI:,67.70,MARSI:,57.34
ASHOKLEY,18/11/2005,RSI:,79.33,MARSI:,61.74
ASHOKLEY,21/11/2005,RSI:,87.05,MARSI:,66.80
ASHOKLEY,22/11/2005,RSI:,75.94,MARSI:,68.63
ASHOKLEY,23/11/2005,RSI:,73.60,MARSI:,69.62
ASHOKLEY,24/11/2005,RSI:,77.24,MARSI:,71.15
ASHOKLEY,25/11/2005,RSI:,77.24,MARSI:,72.37
ASHOKLEY,26/11/2005,RSI:,75.73,MARSI:,73.04
ASHOKLEY,28/11/2005,RSI:,77.46,MARSI:,73.92
ASHOKLEY,29/11/2005,RSI:,80.88,MARSI:,75.32
ASHOKLEY,30/11/2005,RSI:,68.75,MARSI:,74.00
ASHOKLEY,01/12/2005,RSI:,71.34,MARSI:,73.47
ASHOKLEY,02/12/2005,RSI:,63.58,MARSI:,71.49
ASHOKLEY,05/12/2005,RSI:,52.42,MARSI:,67.68
ASHOKLEY,06/12/2005,RSI:,49.57,MARSI:,64.06
ASHOKLEY,07/12/2005,RSI:,50.00,MARSI:,61.24
ASHOKLEY,08/12/2005,RSI:,64.28,MARSI:,61.85
ASHOKLEY,09/12/2005,RSI:,63.78,MARSI:,62.24
ASHOKLEY,12/12/2005,RSI:,52.63,MARSI:,60.32
ASHOKLEY,13/12/2005,RSI:,50.00,MARSI:,58.25
ASHOKLEY,14/12/2005,RSI:,56.80,MARSI:,57.96
ASHOKLEY,15/12/2005,RSI:,51.20,MARSI:,56.61