fxDreema

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

    Building up huge numbers of windows from custom indicators

    Questions & Answers
    2
    4
    1350
    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.
    • D
      dscoles last edited by

      Hello,

      I have three custom indicators without source code that I am capturing data from their buffers. However, the EA seems to create a new window for each time that I call each indicator to set variables within 'Modify Variable' blocks.

      When I stop the EA even after running for just a minute in the Metatrader 4 Strategy Testor, I can have a hundred windows generated under the indicators list for the window.

      I have tried using 'Select Object By Name" with the name of the indicator (e.g., FL11) and connecting that to Delete Objects with 'name starting with' value of FL11. I have also tried using ONLY the 'Delete Objects' with the 'Name Stars With' value set (e.g., FL11). These blocks are run after the blocks which use these indicators for every candlestick. I have included as many of these groupings as there are calls of each indicator. In other words, during the 'for each candle' set, I call FL11 four times. After setting my variables, I run the 'delete' blocks four times (to no avail).

      Is there a way for me to get rid of these instances of the indicators on the chart? Otherwise there could possibly be hundreds of thousands of them when running the EA for a week at a time.

      BTW, I have never seen this before. I have also never used these particular indicators before. But I have used custom indicators without source code quite often without seeing this outcome.

      I am running Build 99 23 August 2015

      Thanks,

      Dwight

      1 Reply Last reply Reply Quote 0
      • D
        dscoles last edited by

        Solution Found!

        OK... So now I am a bit confused, humored and surprised.

        By pure happenstance and serendipity I stumbled into an answer to the mass-generation of sub-windows, one for each candle processed by the EA.

        I had been naming the template I use "Dots MACD" and for whatever reason I was naming my EA "DotsMACD". When I made a new version of the EA, calling it "Dots MACD" (extra space in the middle like the template) I was surprised to see that the template was immediately loaded at the time the EA began running. It must search for a template with the same name as the EA. Which is cool. ⚠

        My experience up until now is that I have to pause the EA to manually load my template before continuing to run the session. So, now I get a "two-fer"! Now I can just start up the EA and let it rip!

        The best part is that no matter how long I run the EA now, when it stops running, the only windows displayed in the trading screen are those associated with the template. The hundreds of extra sub-windows are no longer being generated for my EX4-Only indicators. Sweet! 😆

        Dwight

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

          Mmmm I think you still don't know the real reason behind this effect 🙂 It happens when some of the input parameters have incorrect data type. Because you sent me a copy of the EA you used, I can find this inside it:

          __double retval=iCustom(SYMBOL,TIMEFRAME,"FL23", %(#FF0000)[false,false,false,"",false,31] ,0,SHIFT+IndicatorMoreShift());[/quote:24agnciw]

          In red, these are the input parameters and "false" is boolean. Because I also got a copy of the indicator itself, I can see that it's first parameter is string, it's not boolean. Here is a screenshot:

          http://prntscr.com/8ss8dn

          You can fx everything by chosing "string" as a data type for the first parameter. The same as the 4th parameter. All the others look fine.

          1 Reply Last reply Reply Quote 0
          • D
            dscoles last edited by

            The issue is resolved for the right reason now! Thank you.

            I created a blank string variable and used it for the first and fourth parameter. Only one sub-window is created now.

            Very good call!

            Dwight

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

            Online Users

            M
            N
            C
            S
            S
            P

            15
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors