fxDreema

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

    Finding buffer in source code of indicator

    Questions & Answers
    5
    6
    1622
    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.
    • S
      simharr last edited by

      Hi

      I have done a trace on an indicator, but that returns "EMPTY_VALUE (BUFFER 0)" error messages for the 3 buffers.

      The indicator works in mt5 both on live and backtesting charts. It also seems to work in fxdreema, in that it recognizes both input and the 3 buffer values in the source code.

      But for some reason it registers the 3 values as empty. Buffer 0 and 1 are for painting the candles, and buffer 2 are for plotting a line. Perhaps this is the reason behind the empty values?

      I looked through the tutorial and it states that "property" indicates where the buffers are located in the program code (source code), so I copy pasted that part of the source code below, hope it is the right place to find the error in the buffers 🙂 As can be seen in the code, the indicator have only 3 buffers, which fxdreema finds seemingly correctly.

      Hope you can help

      The code:
      #property indicator_chart_window
      #property indicator_buffers 12
      #property indicator_plots 3
      #property indicator_label1 "Trend bars"
      #property indicator_type1 DRAW_COLOR_BARS
      #property indicator_color1 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_label2 "Trend candles"
      #property indicator_type2 DRAW_COLOR_CANDLES
      #property indicator_color2 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_label3 "Trend line"
      #property indicator_type3 DRAW_COLOR_LINE
      #property indicator_color3 clrDarkGray,clrDeepSkyBlue,clrSandyBrown
      #property indicator_style3 STYLE_DOT

      T 1 Reply Last reply Reply Quote 0
      • l'andorrĂ 
        l'andorrĂ  last edited by

        Another question for real programmers! Any volunteering here?

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        1 Reply Last reply Reply Quote 1
        • A
          abubakar last edited by abubakar

          you have to edit the buffer

          1 Reply Last reply Reply Quote 0
          • A
            ask4abusaidu last edited by

            your indicator buffers should start like this also

            IndicatorBuffers(5);
            SetIndexBuffer(0,histou);
            SetIndexStyle(0,ShowBars ? DRAW_HISTOGRAM : DRAW_NONE);
            SetIndexBuffer(1,histod);
            SetIndexStyle(1,ShowBars ? DRAW_HISTOGRAM : DRAW_NONE);
            SetIndexBuffer(2,limu);
            SetIndexStyle(2,DRAW_LINE);
            SetIndexBuffer(3,limd);
            SetIndexStyle(3,DRAW_LINE);
            SetIndexBuffer(4,fillu);
            SetIndexStyle(4,DRAW_LINE);

            according to the buffers starting from 0 to 2

            and also replace
            #property indicator_buffers 12
            to
            #property indicator_buffers 3
            since its 3 buffers total

            if still doesn't work then you have to input the buffers manually
            like this

            0_1572733232769_49c1db1e-d3cb-463e-ad19-dc07f3e50f09-image.png

            1 Reply Last reply Reply Quote 0
            • S
              simharr last edited by

              Not being a programmer, I couldnt get this to work.

              Seems that the person who programmed this went a totally different route than the one suggested here. He did this:

              //--- indicator buffers mapping
              SetIndexBuffer(0,baro,INDICATOR_DATA);
              SetIndexBuffer(1,barh,INDICATOR_DATA);
              SetIndexBuffer(2,barl,INDICATOR_DATA);
              SetIndexBuffer(3,barc,INDICATOR_DATA);
              SetIndexBuffer(4,barcl,INDICATOR_COLOR_INDEX);
              SetIndexBuffer(5,cano,INDICATOR_DATA);
              SetIndexBuffer(6,canh,INDICATOR_DATA);
              SetIndexBuffer(7,canl,INDICATOR_DATA);
              SetIndexBuffer(8,canc,INDICATOR_DATA);
              SetIndexBuffer(9,cancl,INDICATOR_COLOR_INDEX);
              SetIndexBuffer(10,line,INDICATOR_DATA);
              SetIndexBuffer(11,linecl,INDICATOR_COLOR_INDEX);
              //---

              So if I change #property indicator_buffers 12 to 3, it will mess up the above code for 12 (0-11) internal buffers, of which 3 are shown?

              1 Reply Last reply Reply Quote 0
              • T
                trader.philipps @simharr last edited by

                @simharr Can you share the indicator? An what exactly is the problem? There can be empty buffers as their values may not be required for painting anything, but for further calculations. Do you need values other than the painted ones?

                I like to share my knowledge, but expect the others to contribute as well.

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

                Online Users

                S
                M
                2
                M
                M
                N
                B

                22
                Online

                146.6k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors