fxDreema

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

    Which module put first?

    Questions & Answers
    2
    7
    1353
    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
      avrahambr last edited by

      Hi!

      Which module should I put first? "Once per bar" or "No trade".

      Avraham

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        Hi, it depends on your strategy, first can be a lot of blocks ...

        Between trading and gambling is a very small gap, be careful.

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

          I mean that "if there is no trade, the EA should check some conditions and open trades". However i want to know in which way it will take less work and less resources. If i put the "once per bar" first, it will work only once per bar? if i put " no trade" first, will it check every tick?
          Thanks for your answer!

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

            And same question about time filter, i.e. "not friday". If i put it first, will the EA stop checking there from beginning of friday to end, or will it check every tick what is the day now.

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

              Sorry, i didn't write well.
              I mean: " if there is no trade, the EA should check conditions once per bar and open trades"

              1 Reply Last reply Reply Quote 0
              • M
                miro1360 last edited by miro1360

                On Tick section (event) - first blocks are checked on each tick
                when is first block "No trade" - it is checked on each tick ...
                when is first block "Once per bar" - it is also checked on each tick ...
                these blocks cost small amount of resources and are working as filters ... but other blocks like complicated indicators used in Condition block can cost you more resources ... and when you use "Once per bar" block before them, you can save resources 😄 but it must be your strategy (strategy which will not depends on each tick) ....

                normally you can do it like this:

                No trade
                Once per bar
                Condition1 (with candle ID=1)
                Condition2 (candle ID=1)
                Buy/Sell

                or:
                No trade
                Condition1 (candle ID=0)
                Condition2 (candle ID=0)
                Buy/Sell

                second example is using candle ID 0 (current candle) and you should not use Once per bar because you want check each tick (on current candle) ...

                Between trading and gambling is a very small gap, be careful.

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

                  Thank you Miro!

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

                  Online Users

                  H
                  E
                  J
                  S
                  W
                  A
                  H
                  H

                  18
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors