fxDreema

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

    Not sure I fully understand the 'For each trade' block as it is

    Questions & Answers
    3
    7
    803
    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.
    • l'andorrà
      l'andorrà last edited by

      I want to create my first array with fxDreema blocks and no custom code. Obviously I failed, but I guess I'm missing something important when dealing with the 'For each trade' block. Any help will be appreciated. This is my project:

      https://fxdreema.com/shared/PXFDNj0wd

      Everything below block ID 4 works correctly so no problem there. Now let's focus on the right. I need to filter how many profitable trades are open right now. That should happen on block ID 55. Then the combined profit of each new trade found by the loop should be added to the variable on block ID 58. When the calculation in block ID 59 is true (ie the accumulated profit plus a gain value is higher than the loss stored in the variable of block ID 54), the loop is broken and loop moves to block ID 62. If not true a variable is counting how many trades are necessary for condition in block ID 59 to be true.

      Once this loop is broken or finally executed, block ID 62 is closing the trade identified in block ID 54. Finally the loop in block ID 61 should also close as many trades as previously identified in block ID 56. Considering that both loops in blocks ID 5 and 61 are ordered to search exactly in the same direction (profitable last). The second one should close those found by block 5's loop. However, no trade is closed at all. 😞

      Can someone please tell me what am I missing?

      (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.

      Q 1 Reply Last reply Reply Quote 0
      • Q
        q8carpenter @l'andorrà last edited by

        @l-andorrà Hello,

        To be honest, I'm not able to follow exactly what is supposed to happen here but I have a way that you may be able to follow the error. It seems to me that it may be that one of these variables are not being calculated correctly. Just place a comment block with all these variables and visually follow through a backtest while seeing exactly the values of these variables in the comment panel.

        Other than that, the block orders may be the problem here. I think that these changes may work.
        0_1623604937717_block number order.png

        l'andorrà 1 Reply Last reply Reply Quote 0
        • l'andorrà
          l'andorrà @q8carpenter last edited by

          @q8carpenter Thank you for your reply. I forgot to say that I already used a 'comment' block to visualize the value of the variables and I confirm they are not calculated correctly. Their value is always 0 and I don't know why. On the other hand, block ID 62 needs to be executed AFTER block ID 5 so it should work. 😞

          (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.

          S Q 2 Replies Last reply Reply Quote 0
          • S
            seb 0 @l'andorrà last edited by

            @l-andorrà
            That is a tricky loop I admit, if I understand well the condition in block ID 59 can never be true as "guanyatparcial" is always positive and "idmaxperd" always negative.
            In the first branch you want to store the value of the least profitable trade(handling biggest loss), if the top block processes from the least profitable to the most profitable one, you could just make it pass once.

            1 Reply Last reply Reply Quote 0
            • Q
              q8carpenter @l'andorrà last edited by q8carpenter

              @l-andorrà said in Not sure I fully understand the 'For each trade' block as it is:

              On the other hand, block ID 62 needs to be executed AFTER block ID 5 so it should work.

              Yes my friend but the thing that I feel is wrong (and I'm maybe wrong here), is that in the way you have set up the order, I feel that 61 and 63 will run before 56, while 61 has a variable that requires to be updated by 56.

              0_1623682200284_block n umber.png

              l'andorrà 1 Reply Last reply Reply Quote 0
              • l'andorrà
                l'andorrà @q8carpenter last edited by

                @q8carpenter Probably. I'm don't know. I will try a differenet configuration. Thank you for your help.

                (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.

                S 1 Reply Last reply Reply Quote 0
                • S
                  seb 0 @l'andorrà last edited by

                  @l-andorrà
                  Have you tried my recommandation ?

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

                  Online Users

                  E
                  S
                  M
                  2
                  M

                  17
                  Online

                  146.6k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors