fxDreema

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

    Help to reset variable once a day

    Questions & Answers
    3
    3
    639
    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.
    • E
      everjn17 last edited by everjn17

      I was working on my EA for Indices, i have everything run smoothly and had great results in the backtest.
      I run the EA on both DEMO and REAL account at a time. I notice the two of them aren't opening trade exactly at the same time.
      .
      .
      Sometimes the DEMO open trade but not on REAl and vice versa,
      .
      I notice that i use Once Per Day block to toggle a variable that controls the EA to only take one trade per day. So i think this was the culprit for the problem.
      .
      What i want to do since the Indices are open in a different time (example HangSengIndex open at 02 AM GMT and US30 open at 11 PM GMT), i want the Once Per Day block pass at the first candle of the day, so i was ready to execute signal from the indicator later on the day.
      .
      I tried to track this first candle of the day but don't get any result, is there any simpler solution for this? Thanks

      roar U 2 Replies Last reply Reply Quote 0
      • roar
        roar @everjn17 last edited by

        @everjn17 use the "once per bar" block and set that timeframe to D1

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        1 Reply Last reply Reply Quote 0
        • U
          Uriel 0 @everjn17 last edited by

          @everjn17 did you get the solution?

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

          Online Users

          B
          A
          J
          D
          E

          17
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors