fxDreema

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

    sample question

    Questions & Answers
    2
    2
    595
    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.
    • F
      FHTrading last edited by

      hi,

      the block "once per bar", pass in two cases, at the begining of the next candle or at the middle of the candle before.

      Is the a block like "once per bar" but that only pass at the begining of the next candle, and not at the midle of the canlde before?

      Thank you

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

        It depends. It passes when it is executed and the candle is new for the block. If the block is on top (so it runs on every tick) it passes at the very first tick of the new candle. If it's under some condition it can pass later. So if you want it to pass in the beginning, just place it on top (with no other blocks above).
        Also note that each "Once per bar" works for it's own. In other words, if you have multiple blocks "Once per bar" and one of them passes, this will not stop others to pass. Each one has it's own memory (static variable) where the last known candle time is written.

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

        Online Users

        H
        T
        S
        A
        S
        I
        H

        12
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors