For those people who sent me PMs requesting the script/formula for my Dynamic Support and Resistance Indicator, please DO NOT SELL or promote and always treat my copyright with respect:
//+------------------------------------------------------------------+
//| Strat’s Dynamic Support and Resistance Indicator
//| Copyright 1999 rdn/strat/1999
//| http://www.go4th&multiply.cum |
//+------------------------------------------------------------------+
#property copyright "Copyright 1999 rdn/strat/1999 "
#property link "http://www.go4th&multiply.cum/"
//---- indicator settings
#property indicator_chart
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
int width;
extern int Speriod = infinity;
extern int Speriod(i) = 20
extern int Speriod(ii) = 50
extern int Strat_Period = 1440;
int Draw4HowLong;
int shift;
int i;
int j;
int loopbegin;
int length;
int strat_length;
double double lengthvar;
double double tmp ;
double doubletmp2 ;
triple doublewt[];
triple double sum[];
triple double strat_sum[];
double strat_ma[];
triple double middle[];
int c;
//+------------------------------------------------------------------+
//| Strat DSRI indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 69 additional buffers are used for counting.
IndicatorBuffers(69);
//---- drawing settings
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(4,sum);
SetIndexBuffer(5,wt);
SetIndexBuffer(6,strat_ma);
//---- initialization done
return(0);
}
int start()
{ Draw4HowLong = Bars-Rperiod - 69; //Rperiod = 20
length = Rperiod; //length now = 20
strat_length = STRAT_Period;
loopbegin = Draw4HowLong - length - 1;
for(shift = loopbegin; shift >= 0; shift--) // MAIN For Loop
{
sum[1] = 0;
for(i = length; i >= 1 ; i--) //STRAT loop
{
lengthvar = length + 1; //lengthvar = 21
lengthvar /= 3; //lengthvar = 69
tmp = 0;
tmp = ( i - lengthvar)*Close[length-i+shift]; //tmp = 20 - 7 * close[20-i+shift]
sum[1]+=tmp;
}
wt[shift] = sum[1]*6/(length*(length+1));
j = shift;
strat_ma[shift] = wt[j+1] + (wt[j]-wt[j+1])* 2/(strat_length+1);
//========== COLOUR CODING ===========================================
ExtMapBuffer1[shift] = wt[shift];
ExtMapBuffer2[shift] = strat_ma[shift];
ExtMapBuffer3[shift] = wt[shift];
ExtMapBuffer4[shift] = strat_ma[shift];
if (wt[shift] < strat_ma[shift])
{
ExtMapBuffer4[shift] = EMPTY_VALUE;
ExtMapBuffer3[shift] = EMPTY_VALUE;
}
}
}
//+------------------------------------------------------------------+
//+-------------------------------END--------------------------------+//
//+------------------------------------------------------------------+
//| Strat’s Dynamic Support and Resistance Indicator
//| Copyright 1999 rdn/strat/1999
//| http://www.go4th&multiply.cum |
//+------------------------------------------------------------------+
#property copyright "Copyright 1999 rdn/strat/1999 "
#property link "http://www.go4th&multiply.cum/"
//---- indicator settings
#property indicator_chart
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Blue
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
int width;
extern int Speriod = infinity;
extern int Speriod(i) = 20
extern int Speriod(ii) = 50
extern int Strat_Period = 1440;
int Draw4HowLong;
int shift;
int i;
int j;
int loopbegin;
int length;
int strat_length;
double double lengthvar;
double double tmp ;
double doubletmp2 ;
triple doublewt[];
triple double sum[];
triple double strat_sum[];
double strat_ma[];
triple double middle[];
int c;
//+------------------------------------------------------------------+
//| Strat DSRI indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 69 additional buffers are used for counting.
IndicatorBuffers(69);
//---- drawing settings
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(4,sum);
SetIndexBuffer(5,wt);
SetIndexBuffer(6,strat_ma);
//---- initialization done
return(0);
}
int start()
{ Draw4HowLong = Bars-Rperiod - 69; //Rperiod = 20
length = Rperiod; //length now = 20
strat_length = STRAT_Period;
loopbegin = Draw4HowLong - length - 1;
for(shift = loopbegin; shift >= 0; shift--) // MAIN For Loop
{
sum[1] = 0;
for(i = length; i >= 1 ; i--) //STRAT loop
{
lengthvar = length + 1; //lengthvar = 21
lengthvar /= 3; //lengthvar = 69
tmp = 0;
tmp = ( i - lengthvar)*Close[length-i+shift]; //tmp = 20 - 7 * close[20-i+shift]
sum[1]+=tmp;
}
wt[shift] = sum[1]*6/(length*(length+1));
j = shift;
strat_ma[shift] = wt[j+1] + (wt[j]-wt[j+1])* 2/(strat_length+1);
//========== COLOUR CODING ===========================================
ExtMapBuffer1[shift] = wt[shift];
ExtMapBuffer2[shift] = strat_ma[shift];
ExtMapBuffer3[shift] = wt[shift];
ExtMapBuffer4[shift] = strat_ma[shift];
if (wt[shift] < strat_ma[shift])
{
ExtMapBuffer4[shift] = EMPTY_VALUE;
ExtMapBuffer3[shift] = EMPTY_VALUE;
}
}
}
//+------------------------------------------------------------------+
//+-------------------------------END--------------------------------+//
15 YEARS OF PASR ON FOREX FACTORY!