fxDreema

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

    INIT

    Questions & Answers
    2
    4
    1544
    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.
    • H
      hilavoku last edited by

      Hiho,

      i have a massive problem in programming the INIT function. I use a variable 'CurrentBar' which i count from a given number down to 1 to draw some objects on specific circumstances. The function doesn't return and count the variable down till a stack overflow error. Can you post a simple example on how to draw some objecs in the INIT function and/or explain how to exit the INIT?

      thx in advance

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

        EA builders are good to quickly add/remove things like Buy, Sell, Close and similar. When it comes to variables manipulation you are searching for troubles with every new block that is visually bigger than the variable itself 🙂
        Now you have a big net of blocks that do very simple things, and in that case it will be better to write all this in MQL4 code 🙂

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

          And by the way, I think you want to create an indicator. Maybe the right choise is to really do that. Fxdreema can't help much, but at least I think it's funny (that's why there are many indicators around).

          Init can't be escaped because each block is enclosed in a different function, and with putting "return;" in a block you actually escape the function created for this block, but not the main "init()" function.

          1 Reply Last reply Reply Quote 0
          • H
            hilavoku last edited by

            Thanks for the replys. It will be no indicator but the EA should also show you what the EA will see within the price action and why it took a trade. So i draw some rectangles to show what also had been in the past.
            I already removed the return statement 😄 . That was pure nonsense from my side.

            At the moment i try to use some MQL block to shrink the number of blocks. But what i like to see is to shrink the opened MQL-code box more than it is possible at the moment.
            The overview of the EA is nat that good and a block with a short label can't express what i do in it...

            Hope i will get around the error i see at the moment and why the CurrentBar value can go under 0 when there is block to catch it and it why it will be executed till error... ❓

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

            Online Users

            C
            N
            D
            P
            K
            K
            W
            A
            A
            E

            19
            Online

            146.8k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors