fxDreema

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

    How to check entry conditions multiple times

    Questions & Answers
    2
    4
    1379
    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.
    • I
      iagnew last edited by

      Hello, I am very new to forex trading and creating EAs. I wanted to know how or if it's possible to check for entry and exit conditions multiple times before opening/closing a position. For example, if I wanted to enter when a Moving Average 7 is above a Moving Average 13 and I wanted my EA to check for those conditions every 15 seconds for 1 minute how would I do that? I would want something along the lines of this passing "X" times before opening a position, and, reseting if it fails and timed check. Any assistance will be very much appreciated.

      Thank you

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

        When creating EA, the main part of it's content is executed on every tick. That's why it is EA - somethings that monitors changes and takes actions when needed.
        You can see 5 buttons above the main workfield and one of them says "on Tick" and it's normally active. What you place in this workfield will be executed again and again when a new tick comes.

        1 Reply Last reply Reply Quote 0
        • I
          iagnew last edited by

          Ok, I understand it goes through it's cycle every tick, but, is there a way to loop part of the ea (conditions for entry/exit) more than once before it makes a trade. I understand running every tick indicators may cross for a few seconds due to volatility, that is why i would like to run the conditions a few times before it places a trade.

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

            Indicators also changes because of ticks. Everything changes only because of ticks, so there is no need to repeat something when there are no ticks. If you repeat some conditions 10 times between two ticks, the results will be the same, because indicators depends on ticks.
            If you want to repeat something say 10 times within a tick, find a block named "Free loop...". There is also one named "Sleep". But I can't find any reason to do this 🙂

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

            Online Users

            M
            G
            F
            J
            D
            M

            14
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors