fxDreema

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

    Check for consecutive losses for a pair within last 15 seconds

    Questions & Answers
    3
    5
    712
    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
      Darekl last edited by

      I would like to add a safety net to my EA by building in logic that checks for consecutive opening/closing of trades within a specified times. This is to ensure that once the EA is on a live account, if issues arise that weren't apparent during testing, I can put a block to either delay the trading by x amount of time or terminate the EA.

      I know how to do the latter, delaying additional trades and terminating the EA, what I can't figure out is how to check for consecutive opening and closing of trades within a short span of time (2 mins).

      I tried using the Check age block, but that doesn't seem to be working right.

      https://fxdreema.com/shared/6viqlj7Zd

      Any and all help would be greatly appreciated.

      TipsyWisdom l'andorrà 2 Replies Last reply Reply Quote 0
      • TipsyWisdom
        TipsyWisdom @Darekl last edited by TipsyWisdom

        @darekl

        0_1627091064307_21ca634d-226c-4824-954a-2c42fbf3d9d2-image.png

        something about this seems like the wicked smaht way to do it. Just turn off the buy and sell blocks. Because it leaves the EA running instead of terminating, you could also program in something to turn them back on later.

        1 Reply Last reply Reply Quote 0
        • D
          Darekl last edited by

          @TipsyWisdom the issue with this is that I'm okay if the losses occur naturally over time, even if they are consecutive. What I'm really trying to figure out is how to identify consecutive opens and closes within a short time frame. I've had this happen a few times when I missed something in my logic/blocks with how the trades open based on specific signals, and then immediately close because they're triggered by my blocks triggering closing of trades. This is why I want to build in safeguards to terminate the EA in such circumstances.

          Any thoughts on how to add the time component to your solution?

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

            1. NEVER EVER use once per day unless its acting as a function of...drawing lines, running custom code.
            2. Limit it by using the block "once per bar," and then inside that block, change the time to how many bars (candles) you would want it to work. I.e. If I have a strat I expect that could potentially trade once per hour with profit, I'll change it to H1.
            3. Placement of that block, right above your buy now and sell now blocks...nowhere else.
            1 Reply Last reply Reply Quote 0
            • l'andorrà
              l'andorrà @Darekl last edited by

              @darekl You should use a 'For each trade' block on top of your structure for that 'check age' block to work properly.

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

              Online Users

              E
              H

              15
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors