MQL4 - automated forex trading   /  

Code Base

The Statistic Analysis of Market Movements and Their PrognosesThe Statistic Analysis of Market Movements and Their Prognoses Screenshot
USDJPY, M15
Demo
Subscribe to signal
ReticoloFX JPY Basket
40.46%, 1 335.89 USD
YEA3 - simple EAExpert
YEA3 - simple EA
Author: afterburner.pl
Color Candles Identify the Major TrendColor Candles Identify the Major Trend Try product
Color Candles Identify the Major Trend
Author: fxmeter

Code Base  Indicators  Kolier_SuperTrend_Indi To post a new code, please log in or register

Download MetaTrader 5 and visit MQL5.community Code Base
and Trade on the Go!
and Trade on the Go!
Prepare for the Championship
Couldn't find the right code? Order it in the Jobs section

This library is for
MetaTrader 4
Download MT 4 - 455 Kb

and Trade on the Go!

and Trade on the Go!

Name:
Kolier_SuperTrend_Indi [ ru ]
Author: kolier (2010.11.29 15:32)
Downloaded: 7662
Download:
 Kolier_SuperTrend_Indi.mq4 (5.8 Kb) View

Author:

Kolier.Li

Description:

SuperTrend.mq4 was created by Jason Robinson (jnrtrading) and published on http://www.forex-tsd.com/221493-post1.html

Logic of SuperTrend.mq4: http://kolier.li/indicator/how-supertrend-mq4-works-logic-of-supertrend-indicator-created-by-jason-robinson-jnrtradin

What's Kolier_SuperTrend_Indi

    • Same logic, improvement implementation in code, can draw full chart and less resource consume.
    • Extended. TrendMode=0 means original logic for trend line. TrendMode=1 means new logic for trend line.

    Image:

    TrendMode=0




    TrendMode=1


    Parameters

    • BarsToCount How many bars to draw trend line.
    • TrendMode TrendMode=0 means original logic for trend line. TrendMode=1 means new logic for trend line.
    • ATR_Period ATR Period settings.
    • ATR_Multiplier In order to calculate upper and lower bands with ATR Range = Multiplier * ATR.


    Issues and Update

    4 comments  To post a new comment, please log in or register
    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.
    05.01.2013 23:19 skaboy
    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!

    05.01.2013 23:16 skaboy

    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

    28.05.2011 16:25 gbemitte
       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
    01.12.2010 20:22 WHRoeder