Indicators: Kolier_SuperTrend_Indi

 

Kolier_SuperTrend_Indi:

Indicator for detect trends of the market. For trend following usage.

Author: KoliEr Li

 
   int limit = Bars - bars_counted;
   ...
   for(int i=limit; i>=0; i--) {
      atr = iATR(Symbol(), 0, ATR_Period, i);
         ...
         buffer_line_up[i] = (High[i+1]+Low[i+1])/2;
When bars_counted == 0, accesses High[Bar+1], High[Bar] and buffer[Bar] which do not exist. Also iATR is undefined for i=Bars-ATR_Period and above
 

Hello Kolier,

can you please code an EA that will be working as Kolier_SuperTrend_Indi on 4hr time frame.

The EA will open a buy oder when the green line is appear and close the oder when red line appear. And the open sell oder immediately red line appear and close it when green line appear.

Hope to hear from you .

Thanks

 
WHRoeder:
   int limit = Bars - bars_counted;
   ...
   for(int i=limit; i>=0; i--) {
      atr = iATR(Symbol(), 0, ATR_Period, i);
         ...
         buffer_line_up[i] = (High[i+1]+Low[i+1])/2;
When bars_counted == 0, accesses High[Bar+1], High[Bar] and buffer[Bar] which do not exist. Also iATR is undefined for i=Bars-ATR_Period and above
good observation, but to what purpose? The indicator wprks fine a shown, that's all one needs to use it!
 
gbemitte:

Hello Kolier,

can you please code an EA that will be working as Kolier_SuperTrend_Indi on 4hr time frame.

The EA will open a buy oder when the green line is appear and close the oder when red line appear. And the open sell oder immediately red line appear and close it when green line appear.

Hope to hear from you .

Thanks


imho, this is a great piece of work. I would use it with , for example, a moving average, for entry with entry and exit.  Use a strategy tester to see for yourself how useful it may be.
 

This indicator stops drawing line on live prices in Trend Mode 1.