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 Karthik, i need some help. can u guide as to how u make ur ...


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
  #1111  
Old 20th December 2007, 09:36 PM
Member
 
Join Date: Aug 2005
Posts: 274
Thanks: 0
Thanked 1 Time in 1 Post
ragh_ash is on a distinguished road
Reputation: 21
Default Re: Experiments in Technical Analysis

Hi Karthik,
i need some help.
can u guide as to how u make ur charts background black.
i need black back ground for your AFLs, but white for my own.
regards
Reply With Quote
Sponsored Links
  #1112  
Old 20th December 2007, 10:25 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by ragh_ash View Post
Hi Karthik,
i need some help.
can u guide as to how u make ur charts background black.
i need black back ground for your AFLs, but white for my own.
Insert

SetChartBkColor(colorBlack);

at the beginning of Karthik's AFL files.

For a little more flexibility use
SetChartBkColor( ParamColor( ''BkColor'', colorBlack ) ) ;

Regards,
Kalyan.
Reply With Quote
  #1113  
Old 21st December 2007, 01:10 PM
Member
 
Join Date: Dec 2004
Posts: 770
Thanks: 0
Thanked 5 Times in 5 Posts
amarnath is on a distinguished road
Reputation: 38
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by chintan786 View Post
hi karthik I want to Insert Carmilla Pivot Point formula in this AFL... but not getting desired results when compare it with JOYMITALI's calculator..

help me plz..


I have done some net practise .... and get some mixed results.

I am pasting my AFL..

/***************************************/
/*PIVOT POINTS ver 1.1 written by Avi b*/
/***************************************/

// please note: i use the current value for the NEXT DAY
h1= SelectedValue (Ref(H,0) );
l1= SelectedValue (Ref(L,0) );
c1= SelectedValue (Ref(C,0) );

// PIVOT Calculation
p = ( H1+ L1 + C1 )/3;
s1 = p - (H1 - L1)*1.1/12;
r1 = p + (H1-L1)*1.1/2;
s2 = p -(H1 - L1)*1.1/6;
s3 = p - (H1-L1)*1.1/2;
r2 = p +(H1 - L1)*1.1/6;
r3 = p +(H1-L1)*1.1/12;

// PIVOT mid points
MIDR1 = (P+R1)/2;
MIDR2 = (R1+R2)/2;
MIDR3 = (R2+R3)/2;
MIDS1 = (P+S1)/2;
MIDS2 = (S1+S2)/2;
MIDS3 = (S2+S3)/2;


// Graphs & values plot
Plot (p,"Pivot",25,1);
Plot (r1,"R1",12,1);
Plot (r2,"R2",12,1);
Plot (r3,"R3",12,1);
Plot (s1,"S1",3,1);
Plot (s2,"S2",3,1);
Plot (s3,"S3",3,1);

/*
Plot (MIDR1,"midr1",12,32);
Plot (MIDR2,"midr2",12,32);
Plot (MIDR3,"midr3",12,32);
Plot (MIDS1,"mids1",12,32);
Plot (MIDS2,"mids2",12,32);
Plot (MIDS3,"mids3",12,32);
*/

Plot (C,"Close",16,64);
// side might be ajusted depends on data array
Hight =33;
side = Param("side",73,0,1000,1);

for( i = 0; i < BarCount; i++ )
{
if(i+side== BarCount) PlotText( "Pivot = "+P, i+Hight,P, colorGreen );
if(i+side== BarCount) PlotText( "R1 = "+R1, i+Hight,R1, 12 );
if(i+side== BarCount) PlotText( "R2 = "+R2, i+Hight,R2, 12 );
if(i+side== BarCount) PlotText( "R3 = "+R3, i+Hight,R3, 12 );
if(i+side== BarCount) PlotText( "S1 = "+S1, i+Hight,S1, 3);
if(i+side== BarCount) PlotText( "S2 = "+S2, i+Hight,S2, 3 );
if(i+side== BarCount) PlotText( "S3 = "+S3, i+Hight,S3, 3 );
}

// text section

"HIGH /LOW /CLOSE = " +H +" / "+ L+" / "+ C +"\n";
"H1 /L1 /C1 = " +H1 +" / "+ L1+" / "+ C1 +"\n";

"R3 = " +R3;
"midr3 = " +MIDR3;
"R2 = " +R2;
"midr2 = " +MIDR2;
"R1 = " +R1;
"midr1 = " +MIDR1;
"*************";
"p = " +p;
"*************";
"mids1 = " +MIDS1;
"S1 = " +S1;
"mids2 = " +MIDS2;
"S2 = " +S2;
"mids3 = " +MIDS3;
"S3 = " +S3;



the actula formula I get for Camarilla is..

Camarilla Pivot Points

R4 = C + RANGE * 1.1/2
R3 = C + RANGE * 1.1/4
R2 = C + RANGE * 1.1/6
R1 = C + RANGE * 1.1/12
PP = (HIGH + LOW + CLOSE) / 3
S1 = C - RANGE * 1.1/12
S2 = C - RANGE * 1.1/6
S3 = C - RANGE * 1.1/4
S4 = C - RANGE * 1.1/2


in this first I replaced the range by ( H1 - L1) in abv formula ... results are horrible..

then replacde C1 by p... then also things cme in line but how much reliable they are. only u can tell me.

Chintan
LOL this whole thread seems just rediscovering wheels again
Reply With Quote
  #1114  
Old 21st December 2007, 03:06 PM
Member
 
Join Date: Dec 2004
Posts: 770
Thanks: 0
Thanked 5 Times in 5 Posts
amarnath is on a distinguished road
Reputation: 38
Default Digital MACD

Hi all,

First i like to say i am not a stupid lover of MACD but if some one like take it and make to to get working your self if it works well for u, below i added a code of digital MACD if like make it on u r favourite AB codes or MS as you ppls wish

btw this macd looks smoother and reduce little lag and i prefer smoother equity curve than smooth indicators :d


Code:
#property indicator_separate_window 
#property indicator_buffers 2 
#property indicator_color1 Blue 
#property indicator_color2 Red 

//---- buffers 
double FTLMBuffer[]; 
double STLMBuffer[]; 
double value1; 
double value2; 
double value3; 
double value4; 
//+------------------------------------------------------------------+ 
//| Custom indicator initialization function | 
//+------------------------------------------------------------------+ 
int init() 
{ 
string short_name; 
//---- indicator line 
IndicatorBuffers(2); 
SetIndexStyle(0,DRAW_LINE); 
SetIndexBuffer(0,STLMBuffer); 
SetIndexStyle(1,DRAW_LINE); 
SetIndexBuffer(1,FTLMBuffer); 
SetIndexDrawBegin(0,90); 
SetIndexDrawBegin(1,43); 
//---- 
return(0); 
} 
int start() 
{ 
int shift,counted_bars=IndicatorCounted(); 
if(counted_bars<43) 
{ 
for(shift=1;shift<=0;shift++) FTLMBuffer[Bars-shift]=0.0; 
for(shift=1;shift<=0;shift++) STLMBuffer[Bars-shift]=0.0; 
} 
//---- 
shift=Bars-43-1; 
if(counted_bars>=43) shift=Bars-counted_bars-1; 
while(shift>=0) 
{ 
value1 = 
0.112952*Close[shift+0] 
+0.111644*Close[shift+1] 
+0.109058*Close[shift+2] 
+0.105254*Close[shift+3] 
+0.100320*Close[shift+4] 
+0.094368*Close[shift+5] 
+0.087532*Close[shift+6] 
+0.079966*Close[shift+7] 
+0.071834*Close[shift+8] 
+0.063313*Close[shift+9] 
+0.054575*Close[shift+10] 
+0.045801*Close[shift+11] 
+0.037159*Close[shift+12] 
+0.028809*Close[shift+13] 
+0.020898*Close[shift+14] 
+0.013548*Close[shift+15] 
+0.006870*Close[shift+16] 
+0.000944*Close[shift+17] 
-0.004166*Close[shift+18] 
-0.008428*Close[shift+19] 
-0.011828*Close[shift+20] 
-0.014378*Close[shift+21] 
-0.016112*Close[shift+22] 
-0.017080*Close[shift+23] 
-0.017348*Close[shift+24] 
-0.016998*Close[shift+25] 
-0.016118*Close[shift+26] 
-0.014806*Close[shift+27] 
-0.013156*Close[shift+28] 
-0.011270*Close[shift+29] 
-0.009238*Close[shift+30] 
-0.007152*Close[shift+31] 
-0.005090*Close[shift+32] 
-0.003120*Close[shift+33] 
-0.001302*Close[shift+34] 
+0.000322*Close[shift+35] 
+0.001714*Close[shift+36] 
+0.002858*Close[shift+37] 
+0.003744*Close[shift+38] 
+0.004372*Close[shift+39] 
+0.004754*Close[shift+40] 
+0.004910*Close[shift+41] 
+0.004864*Close[shift+42] 
+0.004646*Close[shift+43] 
+0.004288*Close[shift+44] 
+0.003824*Close[shift+45] 
+0.003288*Close[shift+46] 
+0.002712*Close[shift+47] 
+0.002124*Close[shift+48] 
+0.001548*Close[shift+49] 
+0.001010*Close[shift+50] 
+0.000522*Close[shift+51] 
+0.000098*Close[shift+52] 
-0.000254*Close[shift+53] 
-0.000530*Close[shift+54] 
-0.000734*Close[shift+55] 
-0.000866*Close[shift+56] 
-0.000934*Close[shift+57] 
-0.000948*Close[shift+58] 
-0.000914*Close[shift+59] 
-0.000844*Close[shift+60] 
-0.000750*Close[shift+61] 
-0.000638*Close[shift+62] 
-0.000520*Close[shift+63] 
-0.000922*Close[shift+64]; 

value2 = 
0.038953*Close[shift+0] 
+0.042502*Close[shift+1] 
+0.045773*Close[shift+2] 
+0.048702*Close[shift+3] 
+0.051237*Close[shift+4] 
+0.053326*Close[shift+5] 
+0.054931*Close[shift+6] 
+0.056018*Close[shift+7] 
+0.056566*Close[shift+8] 
+0.056566*Close[shift+9] 
+0.056018*Close[shift+10] 
+0.054931*Close[shift+11] 
+0.053326*Close[shift+12] 
+0.051237*Close[shift+13] 
+0.048702*Close[shift+14] 
+0.045773*Close[shift+15] 
+0.042502*Close[shift+16] 
+0.038953*Close[shift+17] 
+0.035190*Close[shift+18] 
+0.031281*Close[shift+19] 
+0.027295*Close[shift+20] 
+0.023298*Close[shift+21] 
+0.019357*Close[shift+22] 
+0.015532*Close[shift+23] 
+0.011880*Close[shift+24] 
+0.008451*Close[shift+25] 
+0.005287*Close[shift+26] 
+0.002424*Close[shift+27] 
-0.000112*Close[shift+28] 
-0.002305*Close[shift+29] 
-0.004142*Close[shift+30] 
-0.005624*Close[shift+31] 
-0.006758*Close[shift+32] 
-0.007558*Close[shift+33] 
-0.008042*Close[shift+34] 
-0.008240*Close[shift+35] 
-0.008177*Close[shift+36] 
-0.007890*Close[shift+37] 
-0.007415*Close[shift+38] 
-0.006786*Close[shift+39] 
-0.006041*Close[shift+40] 
-0.005219*Close[shift+41] 
-0.004349*Close[shift+42] 
-0.003466*Close[shift+43] 
-0.002596*Close[shift+44] 
-0.001764*Close[shift+45] 
-0.000991*Close[shift+46] 
-0.000294*Close[shift+47] 
+0.000318*Close[shift+48] 
+0.000835*Close[shift+49] 
+0.001254*Close[shift+50] 
+0.001575*Close[shift+51] 
+0.001801*Close[shift+52] 
+0.001937*Close[shift+53] 
+0.001993*Close[shift+54] 
+0.001978*Close[shift+55] 
+0.001902*Close[shift+56] 
+0.001777*Close[shift+57] 
+0.001616*Close[shift+58] 
+0.001428*Close[shift+59] 
+0.001228*Close[shift+60] 
+0.001020*Close[shift+61] 
+0.000816*Close[shift+62] 
+0.000622*Close[shift+63] 
+0.000445*Close[shift+64] 
+0.000287*Close[shift+65] 
+0.000154*Close[shift+66] 
+0.000045*Close[shift+67] 
-0.000040*Close[shift+68] 
-0.000100*Close[shift+69] 
-0.000139*Close[shift+70] 
-0.000159*Close[shift+71] 
-0.000161*Close[shift+72] 
-0.000672*Close[shift+73]; 

value3 = 
0.0729811286*Close[shift+0] 
+0.0727839290*Close[shift+1] 
+0.0721970455*Close[shift+2] 
+0.0712248998*Close[shift+3] 
+0.0698810899*Close[shift+4] 
+0.0681787637*Close[shift+5] 
+0.0661384062*Close[shift+6] 
+0.0637836328*Close[shift+7] 
+0.0611379416*Close[shift+8] 
+0.0582328720*Close[shift+9] 
+0.0551006677*Close[shift+10] 
+0.0517729856*Close[shift+11] 
+0.0482864520*Close[shift+12] 
+0.0446761673*Close[shift+13] 
+0.0409807341*Close[shift+14] 
+0.0372349199*Close[shift+15] 
+0.0334766035*Close[shift+16] 
+0.0297389677*Close[shift+17] 
+0.0260572889*Close[shift+18] 
+0.0224620500*Close[shift+19] 
+0.0189846476*Close[shift+20] 
+0.0156508337*Close[shift+21] 
+0.0124844115*Close[shift+22] 
+0.0095064451*Close[shift+23] 
+0.0067348956*Close[shift+24] 
+0.0041825353*Close[shift+25] 
+0.0018620649*Close[shift+26] 
-0.0002214306*Close[shift+27] 
-0.0020618579*Close[shift+28] 
-0.0036612349*Close[shift+29] 
-0.0050199184*Close[shift+30] 
-0.0061460477*Close[shift+31] 
-0.0070453847*Close[shift+32] 
-0.0077311361*Close[shift+33] 
-0.0082154598*Close[shift+34] 
-0.0085069196*Close[shift+35] 
-0.0086364464*Close[shift+36] 
-0.0086063959*Close[shift+37] 
-0.0084385053*Close[shift+38] 
-0.0081544217*Close[shift+39] 
-0.0077720532*Close[shift+40] 
-0.0073096701*Close[shift+41] 
-0.0067829639*Close[shift+42] 
-0.0062100031*Close[shift+43] 
-0.0056056555*Close[shift+44] 
-0.0049866671*Close[shift+45] 
-0.0043657084*Close[shift+46] 
-0.0037560684*Close[shift+47] 
-0.0031670013*Close[shift+48] 
-0.0026079202*Close[shift+49] 
-0.0020858529*Close[shift+50] 
-0.0016064640*Close[shift+51] 
-0.0011734916*Close[shift+52] 
-0.0007908741*Close[shift+53] 
-0.0004588212*Close[shift+54] 
-0.0001790390*Close[shift+55] 
+0.0000510113*Close[shift+56] 
+0.0002315881*Close[shift+57] 
+0.0003671215*Close[shift+58] 
+0.0004595615*Close[shift+59] 
+0.0005144014*Close[shift+60] 
+0.0005345365*Close[shift+61] 
+0.0005256791*Close[shift+62] 
+0.0028871340*Close[shift+63]; 

value4 = 
0.0077174463*Close[shift+0] 
+0.0093613543*Close[shift+1] 
+0.0110760659*Close[shift+2] 
+0.0128488828*Close[shift+3] 
+0.0146643234*Close[shift+4] 
+0.0165073564*Close[shift+5] 
+0.0183605871*Close[shift+6] 
+0.0202076529*Close[shift+7] 
+0.0220298758*Close[shift+8] 
+0.0238101118*Close[shift+9] 
+0.0255293260*Close[shift+10] 
+0.0271702104*Close[shift+11] 
+0.0287147044*Close[shift+12] 
+0.0301471980*Close[shift+13] 
+0.0314517917*Close[shift+14] 
+0.0326129335*Close[shift+15] 
+0.0336190364*Close[shift+16] 
+0.0344584557*Close[shift+17] 
+0.0351210901*Close[shift+18] 
+0.0356004564*Close[shift+19] 
+0.0358898494*Close[shift+20] 
+0.0359870888*Close[shift+21] 
+0.0358898494*Close[shift+22] 
+0.0356004564*Close[shift+23] 
+0.0351210901*Close[shift+24] 
+0.0344584557*Close[shift+25] 
+0.0336190364*Close[shift+26] 
+0.0326129335*Close[shift+27] 
+0.0314517917*Close[shift+28] 
+0.0301471980*Close[shift+29] 
+0.0287147044*Close[shift+30] 
+0.0271702104*Close[shift+31] 
+0.0255293260*Close[shift+32] 
+0.0238101118*Close[shift+33] 
+0.0220298758*Close[shift+34] 
+0.0202076529*Close[shift+35] 
+0.0183605871*Close[shift+36] 
+0.0165073564*Close[shift+37] 
+0.0146643234*Close[shift+38] 
+0.0128488828*Close[shift+39] 
+0.0110760659*Close[shift+40] 
+0.0093613543*Close[shift+41] 
+0.0077174463*Close[shift+42] 
+0.0061560794*Close[shift+43] 
+0.0046876404*Close[shift+44] 
+0.0033209857*Close[shift+45] 
+0.0020624135*Close[shift+46] 
+0.0009181866*Close[shift+47] 
-0.0001091877*Close[shift+48] 
-0.0010167048*Close[shift+49] 
-0.0018053597*Close[shift+50] 
-0.0024753283*Close[shift+51] 
-0.0030306241*Close[shift+52] 
-0.0034740883*Close[shift+53] 
-0.0038122332*Close[shift+54] 
-0.0040510538*Close[shift+55] 
-0.0041947730*Close[shift+56] 
-0.0042586429*Close[shift+57] 
-0.0042438250*Close[shift+58] 
-0.0041610379*Close[shift+59] 
-0.0040209559*Close[shift+60] 
-0.0038324095*Close[shift+61] 
-0.0036044078*Close[shift+62] 
-0.0033446882*Close[shift+63] 
-0.0030621605*Close[shift+64] 
-0.0027641559*Close[shift+65] 
-0.0024589320*Close[shift+66] 
-0.0021527365*Close[shift+67] 
-0.0018521222*Close[shift+68] 
-0.0015616524*Close[shift+69] 
-0.0012859688*Close[shift+70] 
-0.0010285368*Close[shift+71] 
-0.0007921495*Close[shift+72] 
-0.0005786502*Close[shift+73] 
-0.0003899810*Close[shift+74] 
-0.0002262453*Close[shift+75] 
-0.0000882844*Close[shift+76] 
+0.0000251537*Close[shift+77] 
+0.0001141964*Close[shift+78] 
+0.0001810281*Close[shift+79] 
+0.0002266104*Close[shift+80] 
+0.0002536520*Close[shift+81] 
+0.0002635807*Close[shift+82] 
+0.0002592130*Close[shift+83] 
+0.0014236495*Close[shift+84]; 


STLMBuffer[shift] = value3-value4; 
FTLMBuffer[shift] = value1-value2; 

shift--; 
} 
return(0); 
} 
//+------------------------------------------------------------------+
Attached Images
File Type: jpg macd.JPG (20.5 KB, 59 views)

Last edited by amarnath; 21st December 2007 at 03:15 PM.
Reply With Quote
  #1115  
Old 21st December 2007, 03:27 PM
Member
 
Join Date: Dec 2004
Posts: 770
Thanks: 0
Thanked 5 Times in 5 Posts
amarnath is on a distinguished road
Reputation: 38
Default Digital Filters

Digital filters are intended for signal processing (filtration) presented as time series. We will exaime only line digital filters (hereinafter DF), as thier methods of calculating exist for a long time, both of filters themselves and their characteristics. Besides, they are mostly often used by traders, although traders do not know this themselves.


I will give some examples:

Simple moving average (SMA). As it is known, it is calculated as an average value of final N elements of time series. This is an example of DF with final impulse response (FIR-filter).

Triangular and weighted average (Triangular & Weighted). These moving averages are calculated in the same way as simple average, but members of time series are taken with different weight. For triangular average weight the triangle is made, so middle elements have the largest weight, and last elements - the smallest. For weighted average the last row elements are the most important, unimportant - the most old elements. They are examples of FIR-filters, but with other characteristics.

Here we can add such well-known indicators and their combinations as Momentum, ROC, MACD, TRIX, difference of two moving averages with different periods or taken in different moments of time and many others. I will not describe them in details now. All of them are digital filters and come to a sum (finite or infinte) of input row members taken with some weight or to finite sum of some last members of input row and it is possible that some members of output row taken with some weight. The set of weight defines filters qualities. So we came to a formular of line digital filter, it is written in the following way:

Y[i] = B[0] X[i] + B[1] X[i-1] + .... - A[1] Y[i-1] - A[2] Y[i-2] - ....

Here X – input time series, Y – output row, A and B – sets of weight coefficients.
Reply With Quote
  #1116  
Old 21st December 2007, 06:37 PM
Member
 
Join Date: Aug 2005
Posts: 274
Thanks: 0
Thanked 1 Time in 1 Post
ragh_ash is on a distinguished road
Reputation: 21
Default Re: Experiments in Technical Analysis

Thanks Kalyan
Reply With Quote
  #1117  
Old 21st December 2007, 07:56 PM
Member
 
Join Date: Dec 2004
Posts: 770
Thanks: 0
Thanked 5 Times in 5 Posts
amarnath is on a distinguished road
Reputation: 38
Default Re: Digital MACD

Quote:
Originally Posted by kkseal View Post
Not sure what is being plotted Is it FTLM - STLM?

Anyway, that's s-o much better than the ranting Mr Amarnath

Regards,
Kalyan.
If need Codes of FTLM and STLM will post later
Reply With Quote
  #1118  
Old 21st December 2007, 07:58 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Digital MACD

Quote:
Originally Posted by amarnath View Post
Hi all,

First i like to say i am not a stupid lover of MACD but if some one like take it and make to to get working your self if it works well for u, below i added a code of digital MACD if like make it on u r favourite AB codes or MS as you ppls wish

btw this macd looks smoother and reduce little lag and i prefer smoother equity curve than smooth indicators :d


Code:
#property indicator_separate_window 
#property indicator_buffers 2 
#property indicator_color1 Blue 
#property indicator_color2 Red 

//---- buffers 
double FTLMBuffer[]; 
double STLMBuffer[]; 
double value1; 
double value2; 
double value3; 
double value4; 
//+------------------------------------------------------------------+ 
//| Custom indicator initialization function | 
//+------------------------------------------------------------------+ 
int init() 
{ 
string short_name; 
//---- indicator line 
IndicatorBuffers(2); 
SetIndexStyle(0,DRAW_LINE); 
SetIndexBuffer(0,STLMBuffer); 
SetIndexStyle(1,DRAW_LINE); 
SetIndexBuffer(1,FTLMBuffer); 
SetIndexDrawBegin(0,90); 
SetIndexDrawBegin(1,43); 
//---- 
return(0); 
} 
int start() 
{ 
int shift,counted_bars=IndicatorCounted(); 
if(counted_bars<43) 
{ 
for(shift=1;shift<=0;shift++) FTLMBuffer[Bars-shift]=0.0; 
for(shift=1;shift<=0;shift++) STLMBuffer[Bars-shift]=0.0; 
} 
//---- 
shift=Bars-43-1; 
if(counted_bars>=43) shift=Bars-counted_bars-1; 
while(shift>=0) 
{ 
value1 = 
0.112952*Close[shift+0] 
+0.111644*Close[shift+1] 
+0.109058*Close[shift+2] 
+0.105254*Close[shift+3] 
+0.100320*Close[shift+4] 
+0.094368*Close[shift+5] 
+0.087532*Close[shift+6] 
+0.079966*Close[shift+7] 
+0.071834*Close[shift+8] 
+0.063313*Close[shift+9] 
+0.054575*Close[shift+10] 
+0.045801*Close[shift+11] 
+0.037159*Close[shift+12] 
+0.028809*Close[shift+13] 
+0.020898*Close[shift+14] 
+0.013548*Close[shift+15] 
+0.006870*Close[shift+16] 
+0.000944*Close[shift+17] 
-0.004166*Close[shift+18] 
-0.008428*Close[shift+19] 
-0.011828*Close[shift+20] 
-0.014378*Close[shift+21] 
-0.016112*Close[shift+22] 
-0.017080*Close[shift+23] 
-0.017348*Close[shift+24] 
-0.016998*Close[shift+25] 
-0.016118*Close[shift+26] 
-0.014806*Close[shift+27] 
-0.013156*Close[shift+28] 
-0.011270*Close[shift+29] 
-0.009238*Close[shift+30] 
-0.007152*Close[shift+31] 
-0.005090*Close[shift+32] 
-0.003120*Close[shift+33] 
-0.001302*Close[shift+34] 
+0.000322*Close[shift+35] 
+0.001714*Close[shift+36] 
+0.002858*Close[shift+37] 
+0.003744*Close[shift+38] 
+0.004372*Close[shift+39] 
+0.004754*Close[shift+40] 
+0.004910*Close[shift+41] 
+0.004864*Close[shift+42] 
+0.004646*Close[shift+43] 
+0.004288*Close[shift+44] 
+0.003824*Close[shift+45] 
+0.003288*Close[shift+46] 
+0.002712*Close[shift+47] 
+0.002124*Close[shift+48] 
+0.001548*Close[shift+49] 
+0.001010*Close[shift+50] 
+0.000522*Close[shift+51] 
+0.000098*Close[shift+52] 
-0.000254*Close[shift+53] 
-0.000530*Close[shift+54] 
-0.000734*Close[shift+55] 
-0.000866*Close[shift+56] 
-0.000934*Close[shift+57] 
-0.000948*Close[shift+58] 
-0.000914*Close[shift+59] 
-0.000844*Close[shift+60] 
-0.000750*Close[shift+61] 
-0.000638*Close[shift+62] 
-0.000520*Close[shift+63] 
-0.000922*Close[shift+64]; 

value2 = 
0.038953*Close[shift+0] 
+0.042502*Close[shift+1] 
+0.045773*Close[shift+2] 
+0.048702*Close[shift+3] 
+0.051237*Close[shift+4] 
+0.053326*Close[shift+5] 
+0.054931*Close[shift+6] 
+0.056018*Close[shift+7] 
+0.056566*Close[shift+8] 
+0.056566*Close[shift+9] 
+0.056018*Close[shift+10] 
+0.054931*Close[shift+11] 
+0.053326*Close[shift+12] 
+0.051237*Close[shift+13] 
+0.048702*Close[shift+14] 
+0.045773*Close[shift+15] 
+0.042502*Close[shift+16] 
+0.038953*Close[shift+17] 
+0.035190*Close[shift+18] 
+0.031281*Close[shift+19] 
+0.027295*Close[shift+20] 
+0.023298*Close[shift+21] 
+0.019357*Close[shift+22] 
+0.015532*Close[shift+23] 
+0.011880*Close[shift+24] 
+0.008451*Close[shift+25] 
+0.005287*Close[shift+26] 
+0.002424*Close[shift+27] 
-0.000112*Close[shift+28] 
-0.002305*Close[shift+29] 
-0.004142*Close[shift+30] 
-0.005624*Close[shift+31] 
-0.006758*Close[shift+32] 
-0.007558*Close[shift+33] 
-0.008042*Close[shift+34] 
-0.008240*Close[shift+35] 
-0.008177*Close[shift+36] 
-0.007890*Close[shift+37] 
-0.007415*Close[shift+38] 
-0.006786*Close[shift+39] 
-0.006041*Close[shift+40] 
-0.005219*Close[shift+41] 
-0.004349*Close[shift+42] 
-0.003466*Close[shift+43] 
-0.002596*Close[shift+44] 
-0.001764*Close[shift+45] 
-0.000991*Close[shift+46] 
-0.000294*Close[shift+47] 
+0.000318*Close[shift+48] 
+0.000835*Close[shift+49] 
+0.001254*Close[shift+50] 
+0.001575*Close[shift+51] 
+0.001801*Close[shift+52] 
+0.001937*Close[shift+53] 
+0.001993*Close[shift+54] 
+0.001978*Close[shift+55] 
+0.001902*Close[shift+56] 
+0.001777*Close[shift+57] 
+0.001616*Close[shift+58] 
+0.001428*Close[shift+59] 
+0.001228*Close[shift+60] 
+0.001020*Close[shift+61] 
+0.000816*Close[shift+62] 
+0.000622*Close[shift+63] 
+0.000445*Close[shift+64] 
+0.000287*Close[shift+65] 
+0.000154*Close[shift+66] 
+0.000045*Close[shift+67] 
-0.000040*Close[shift+68] 
-0.000100*Close[shift+69] 
-0.000139*Close[shift+70] 
-0.000159*Close[shift+71] 
-0.000161*Close[shift+72] 
-0.000672*Close[shift+73]; 

value3 = 
0.0729811286*Close[shift+0] 
+0.0727839290*Close[shift+1] 
+0.0721970455*Close[shift+2] 
+0.0712248998*Close[shift+3] 
+0.0698810899*Close[shift+4] 
+0.0681787637*Close[shift+5] 
+0.0661384062*Close[shift+6] 
+0.0637836328*Close[shift+7] 
+0.0611379416*Close[shift+8] 
+0.0582328720*Close[shift+9] 
+0.0551006677*Close[shift+10] 
+0.0517729856*Close[shift+11] 
+0.0482864520*Close[shift+12] 
+0.0446761673*Close[shift+13] 
+0.0409807341*Close[shift+14] 
+0.0372349199*Close[shift+15] 
+0.0334766035*Close[shift+16] 
+0.0297389677*Close[shift+17] 
+0.0260572889*Close[shift+18] 
+0.0224620500*Close[shift+19] 
+0.0189846476*Close[shift+20] 
+0.0156508337*Close[shift+21] 
+0.0124844115*Close[shift+22] 
+0.0095064451*Close[shift+23] 
+0.0067348956*Close[shift+24] 
+0.0041825353*Close[shift+25] 
+0.0018620649*Close[shift+26] 
-0.0002214306*Close[shift+27] 
-0.0020618579*Close[shift+28] 
-0.0036612349*Close[shift+29] 
-0.0050199184*Close[shift+30] 
-0.0061460477*Close[shift+31] 
-0.0070453847*Close[shift+32] 
-0.0077311361*Close[shift+33] 
-0.0082154598*Close[shift+34] 
-0.0085069196*Close[shift+35] 
-0.0086364464*Close[shift+36] 
-0.0086063959*Close[shift+37] 
-0.0084385053*Close[shift+38] 
-0.0081544217*Close[shift+39] 
-0.0077720532*Close[shift+40] 
-0.0073096701*Close[shift+41] 
-0.0067829639*Close[shift+42] 
-0.0062100031*Close[shift+43] 
-0.0056056555*Close[shift+44] 
-0.0049866671*Close[shift+45] 
-0.0043657084*Close[shift+46] 
-0.0037560684*Close[shift+47] 
-0.0031670013*Close[shift+48] 
-0.0026079202*Close[shift+49] 
-0.0020858529*Close[shift+50] 
-0.0016064640*Close[shift+51] 
-0.0011734916*Close[shift+52] 
-0.0007908741*Close[shift+53] 
-0.0004588212*Close[shift+54] 
-0.0001790390*Close[shift+55] 
+0.0000510113*Close[shift+56] 
+0.0002315881*Close[shift+57] 
+0.0003671215*Close[shift+58] 
+0.0004595615*Close[shift+59] 
+0.0005144014*Close[shift+60] 
+0.0005345365*Close[shift+61] 
+0.0005256791*Close[shift+62] 
+0.0028871340*Close[shift+63]; 

value4 = 
0.0077174463*Close[shift+0] 
+0.0093613543*Close[shift+1] 
+0.0110760659*Close[shift+2] 
+0.0128488828*Close[shift+3] 
+0.0146643234*Close[shift+4] 
+0.0165073564*Close[shift+5] 
+0.0183605871*Close[shift+6] 
+0.0202076529*Close[shift+7] 
+0.0220298758*Close[shift+8] 
+0.0238101118*Close[shift+9] 
+0.0255293260*Close[shift+10] 
+0.0271702104*Close[shift+11] 
+0.0287147044*Close[shift+12] 
+0.0301471980*Close[shift+13] 
+0.0314517917*Close[shift+14] 
+0.0326129335*Close[shift+15] 
+0.0336190364*Close[shift+16] 
+0.0344584557*Close[shift+17] 
+0.0351210901*Close[shift+18] 
+0.0356004564*Close[shift+19] 
+0.0358898494*Close[shift+20] 
+0.0359870888*Close[shift+21] 
+0.0358898494*Close[shift+22] 
+0.0356004564*Close[shift+23] 
+0.0351210901*Close[shift+24] 
+0.0344584557*Close[shift+25] 
+0.0336190364*Close[shift+26] 
+0.0326129335*Close[shift+27] 
+0.0314517917*Close[shift+28] 
+0.0301471980*Close[shift+29] 
+0.0287147044*Close[shift+30] 
+0.0271702104*Close[shift+31] 
+0.0255293260*Close[shift+32] 
+0.0238101118*Close[shift+33] 
+0.0220298758*Close[shift+34] 
+0.0202076529*Close[shift+35] 
+0.0183605871*Close[shift+36] 
+0.0165073564*Close[shift+37] 
+0.0146643234*Close[shift+38] 
+0.0128488828*Close[shift+39] 
+0.0110760659*Close[shift+40] 
+0.0093613543*Close[shift+41] 
+0.0077174463*Close[shift+42] 
+0.0061560794*Close[shift+43] 
+0.0046876404*Close[shift+44] 
+0.0033209857*Close[shift+45] 
+0.0020624135*Close[shift+46] 
+0.0009181866*Close[shift+47] 
-0.0001091877*Close[shift+48] 
-0.0010167048*Close[shift+49] 
-0.0018053597*Close[shift+50] 
-0.0024753283*Close[shift+51] 
-0.0030306241*Close[shift+52] 
-0.0034740883*Close[shift+53] 
-0.0038122332*Close[shift+54] 
-0.0040510538*Close[shift+55] 
-0.0041947730*Close[shift+56] 
-0.0042586429*Close[shift+57] 
-0.0042438250*Close[shift+58] 
-0.0041610379*Close[shift+59] 
-0.0040209559*Close[shift+60] 
-0.0038324095*Close[shift+61] 
-0.0036044078*Close[shift+62] 
-0.0033446882*Close[shift+63] 
-0.0030621605*Close[shift+64] 
-0.0027641559*Close[shift+65] 
-0.0024589320*Close[shift+66] 
-0.0021527365*Close[shift+67] 
-0.0018521222*Close[shift+68] 
-0.0015616524*Close[shift+69] 
-0.0012859688*Close[shift+70] 
-0.0010285368*Close[shift+71] 
-0.0007921495*Close[shift+72] 
-0.0005786502*Close[shift+73] 
-0.0003899810*Close[shift+74] 
-0.0002262453*Close[shift+75] 
-0.0000882844*Close[shift+76] 
+0.0000251537*Close[shift+77] 
+0.0001141964*Close[shift+78] 
+0.0001810281*Close[shift+79] 
+0.0002266104*Close[shift+80] 
+0.0002536520*Close[shift+81] 
+0.0002635807*Close[shift+82] 
+0.0002592130*Close[shift+83] 
+0.0014236495*Close[shift+84]; 


STLMBuffer[shift] = value3-value4; 
FTLMBuffer[shift] = value1-value2; 

shift--; 
} 
return(0); 
} 
//+------------------------------------------------------------------+
Not sure what is being plotted Is it FTLM - STLM?

Anyway, that's s-o much better than the ranting Mr Amarnath

Regards,
Kalyan.
Reply With Quote
  #1119  
Old 21st December 2007, 08:04 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

For those who'd like to know more about the method :-

http://www.tradingopedia.com/

Drawing 1-to-1 correspondence with Amarnath's code

value1 -> FATL
value2 -> RFTL
value3 -> SATL
value4 -> RSTL

RFTL = FATL of FATL
RSTL = SATL of SATL

Regards,
Kalyan.
Reply With Quote
  #1120  
Old 21st December 2007, 08:19 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Interesting to see what would correspond to the above method if we were using a traditional IIR filter (EMA)

fpd = fast period (default 12), spd = slow period (default 26)

value1 = EMA(C, fpd)
value2 = EMA(value1, fpd)
value3 = EMA(C, spd)
value4 = EMA(value3, spd)

FTLM = value1 - value2
STLM = value3 - value4

MACD = FTLM - STLM (This last line needs confirmation)

Incidentally, this MACD would actually be a second derivative (acceleration) of price and not the (usual) first (velocity/momentum).

Regards,
Kalyan.

Last edited by kkseal; 22nd December 2007 at 01:58 PM. Reason: Added the last line
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: Experiments in Technical Analysis
Thread Thread Starter Forum Replies Last Post
Technical Analysis Course snowy Technical Analysis 28 7th November 2008 07:37 PM
Technical analysis course sh50 Seminars & Tutors 18 10th June 2007 03:46 PM
Hello everybody.Technical Analysis vijay chauhan Introductions 2 30th May 2007 03:09 PM
Technical Analysis crosscurrency Forex 0 30th October 2005 11:00 PM


All times are GMT +5.5. The time now is 07:33 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com