fxDreema

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

    on Init

    Questions & Answers
    3
    4
    619
    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
      drankman last edited by

      Hello all,

      I am trying to build where I want to display current total number of trades, drawdown from account etc.
      Is it better to do it on INIT or where.

      I saw this and it suggest to do it on INIT and onTrade? Re: on Init and on Trade too

      What did you mean by using "run blocks" here? @fxDreema

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

        Init is where the blocks run only once, in the beginning when you add the EA to the chart. At this time you surely have some information to show, but whatever happens after that will not be updated... assuming that you are using the Comment block. So it depends - do you want to print that information once, or not?

        There is one block Run blocks who can remotely run other blocks by their number. Normally you know that one block runs other blocks by these connections. But you can't connect blocks from Tick to Init, or whatever. So in this case if it's needed, you can use this Run blocks block. And I suggest that if you do, better change the number of the block/s you want to run with some simple text that means something (better don't use spaces and fancy symbols). Because the numbers are kinda confusing.

        D 1 Reply Last reply Reply Quote 0
        • D
          drankman @fxDreema last edited by

          @fxdreema Thanks for the reply.
          Actually I'd like to update it whenever it changes (for instance, the number of trades/lot) . So I think INIT would not be ideal?

          1 Reply Last reply Reply Quote 0
          • J
            Johnster last edited by

            Anyway, I've implemented the global thingy now, seems to work.
            The next is a thing for later.
            Thanks everybody.

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

            Online Users

            E
            H
            M
            M
            M

            9
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors