TriggerLines

sabhlok_r

Well-Known Member
#21
Suggest that you change to 5.5 or 5.6.
It grab some of the idea from Trade Station, you can link multiple charts.
cursor move on 1 chart will move on other charts.

and other better improvement.

and reduce all these stupid problem.
thanks for the suggestion... shall upgrade soon...
 
#26
do the amibroker 5.4 is ok for new afls pasting, kelvinhand.
or it have to be 5.5 only.



where can we find the same stuff or afl for these given charts by other friends, a1b1trader.
 

ayush2020

Well-Known Member
#28
Hi,
Found from:
http://www.forex-tsd.com/metatrader-4/860-2-lsma-color-indicator.html

Code:
//+-------------------------------------------------------------------+
//|                                                     Trigger Line                  |
//|                             Copyright  2005 dwt5 and adoleh2000 |
//|                                        http://www.metaquotes.net        |
//| Modified by Kelvinhand                                                      |
//+-------------------------------------------------------------------+
#property  copyright "Copyright  2005 dwt5 and adoleh2000 "
#property  link      "http://www.metaquotes.net/"

//---- indicator settings
#property  indicator_chart_window
#property  indicator_buffers 4            
#property indicator_color1 Red      
#property indicator_color2 Red
#property indicator_color3 DeepSkyBlue
#property indicator_color4 DeepSkyBlue

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double wt[];
double lsma_ma[];

extern int Rperiod = 55;
extern int LSMA_Period = 144;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
//---- 7 additional buffers are used for counting.
   IndicatorBuffers(6);   
   
//---- drawing settings
   
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
   
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
   
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,1);
   
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1);
     
   SetIndexBuffer(4,wt);         
   SetIndexBuffer(5,lsma_ma);
   
//---- initialization done
   return(0);
  }

int start()
{ 
  
  //***** Modified by Kelvinhand ***********************
   int counted_bars = IndicatorCounted();
   //---- check for possible errors
   if (counted_bars<0) return(-1);
   
   //---- last counted bar will be recounted
   if (counted_bars>0) counted_bars--;

   int i,j;
   double lengthvar;
   double sum ;
   
   int limit = Bars - counted_bars - Rperiod;
      

      for(i = limit; i >= 0; i--)  //  MAIN For Loop
      { 
         sum = 0;                                              
         for(j = Rperiod; j >= 1  ; j--)             //LSMA loop
         {
         lengthvar = (Rperiod + 1)/3.0;                               //lengthvar = 21  
         sum+= ( j - lengthvar)*Close[Rperiod-j+i];         //tmp = 20 - 7 * close[20-j+i]
         }
         wt[i] = sum*6/(Rperiod*(Rperiod+1));  
         lsma_ma[i] = wt[i+1] + (wt[i]-wt[i+1])* 2/(LSMA_Period+1);
  
            ExtMapBuffer1[i] = wt[i]; 
            ExtMapBuffer2[i] = lsma_ma[i]; 
            ExtMapBuffer3[i] = wt[i]; 
            ExtMapBuffer4[i] = lsma_ma[i]; 
            
            if (wt[i]  < lsma_ma[i])
            {
                ExtMapBuffer4[i] = EMPTY_VALUE;
                ExtMapBuffer3[i] = EMPTY_VALUE;
           }          
        
        }
  }
//+------------------------------------------------------------------+

hii i have used this formula now .. when i have applied for crude oil, copper and silver ... though time frame is 15 min .. but i didnt get any clear trend. is there any specific time frame to be used with this ??? it seems it is ok for positional kind of trade where we may use 1 hr or 4 hr charts..
 

a1b1trader

Well-Known Member
#29
where can we find the same stuff or afl for these given charts by other friends, a1b1trader.
I do not know, where we can get other indicator's AFL or one has to search the web etc.

It is only because of hard work of coding, done by KelvinHand, that we get the AFL of this indicator, Triggerlines.