fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Super Trend Indicator EA

    Questions & Answers
    4
    4
    7580
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      andyjames last edited by

      Hello,

      Quite often in MT4 we use visual indicators. For example Heiken Ashi where the candles change colour to indicate and smooth out trends. The only problem is to understand how these visual indicators change colour because your EA will not recognise the indicators colour value. You need to understand what's in the buffers.

      If you do not know how to do this here's a very simple method.

      1. Import your indicator (mq4) as it is. Don't change any values or rename any buffers.
      2. Create a new project, stick a 'once per bar' block at the top.
      3. Connect a 'file write (excel table)' block.
      4. Set the columns to 'my indicators' and select each buffer.
      5. Run this EA in visual mode with the actual indicator attached to your chart.

      When your visual indicator has changed colours or whatever a few times stop the test.
      Go to C:\Program Files (x86)\MetaTrader - Alpari UK\tester\files and open your Excel.
      Look at the different buffer values in your Excel tables and map them to your strategy tester chart. You will see a correlation between the values.
      Then create a simple EA to put something, for example a blue up arrow when the indicator should turn bullish.

      NB. Often you will see the value 2147483647 in a buffer, this in mq4 I think means Empty Value, so always create a variable or constant with this value so you can compare buffers against it.

      Anyway, I import a lot of custom indicators into fxdreema so today I'd like to share with you one of my favourites, the Super trend indicator. Attached is a zip file containing...
      SuperTrend.mq4 (the indicator)
      SuperTrendEA.mq4 (the EA)
      ST.tpl

      Add the Supertend indicator to your fxdreema indicators first.
      Then you can import SuperTrendEA.mq4 as a project, fxdreema menu Projects->Load project from file.. it works with mq4 as well as xml.

      SuperTrend indicator is ..
      Green and flat (green thumbs up)
      Green and bullish (green up arrow)
      Pink and flat (red thumbs down)
      Pink and bearish (red down arrow)

      You can look at the project and see the various conditions which paint the arrows and thumbs. Just use those conditions in your real EA. Here's a 3 minute video to see it in action..

      [youtube:18wwelur]http://www.youtube.com/watch?v=_oPmElsdQZs[/youtube:18wwelur]

      If you like this then offer something in return, post a gift for others and we'll all be better off.

      Andy

      ......
      SuperTrendEA.rar

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        Indicators communicate with EA's via buffers, and buffers are simply holders of values. No more than 8 buffers for an indicator are allowed. Those buffers can represents OR NOT the objects drawn by indicator (lines, arrows, histograms and others)

        Normally, if the indicator is written with all the best rules, each object of the indicator will be represented with it's own buffer. If there is a line that shows value 55 on the screen, then there will be buffer named like "LineBuffer" with the same value of 55. As we already know, EA's can read buffers, they does not search for objects actually.

        An indicator can show line, histogram, arrow or other objects. While the line is normally continuous with each value very close to the others, arrows are not the same nature. Arrows are either exists or not exists. So, in case there is a buffer that represents arrow, while the arrow is visible, the buffers holds value of the level where the arrow is positioned - price value like 1.2683. But, when we have no arrow on chart, what is the vaule inside the buffer?

        Buffers that represents signals drawn by arrows normally holds a value like the price level where the arrow is located. And there are many possible variants when there is no signal/no arrow. In such case the buffer can be 0, 2147483647 or negative value like -1. Why is that? It depends on how the indicator is written, it depends on the developer's work. But in order to work with that indicator, you MUST know what happens in it's buffers.

        As I said before, buffers can represent objects, or can return values that are no "visible". And it's not that rare situation where you can find an indicator with broken buffers, where you will not find any logical meaning in what the buffers says. This can happen if the indicator is written by someone, then updated from another one who is not as good programmer as he believes he is.

        %(#FF8000)[Now, to make things a lot easier I just made a new block named "Levels tester (for indicators and more)". Use it to check custom indicator's buffers when you are not sure what values they hold. You will be able to see values as a line and actual numbers. Use this in "Visual mode" of course.]

        1 Reply Last reply Reply Quote 1
        • D
          dbenie last edited by

          HI, Does this EA work on MT4 for auto trading. If not are you willing to provide an operational EA?

          1 Reply Last reply Reply Quote 0
          • T
            tradingest last edited by

            Hello,
            the EA with Super Trend Indicatore (with CCI and ATR) you can have it?
            I can not make it run on MT4 platform.

            How can I do?

            thanks,
            tradingest

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            Online Users

            H
            A
            P
            K
            E
            F
            M
            F

            14
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors