fxDreema

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

    Calc profit of first and last trade. And Once per Position block.

    Questions & Answers
    2
    6
    285
    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.
    • General Melchett
      General Melchett last edited by

      I'd like to implement something into my grid trading bot. It takes the first and last trade of a batch, and closes out when in x pips profit.

      I can get/calc the average open, average lots and therefore calculate the profit of first and last trade, but I need to do this only once when x amount of trades is open. So I decided to use the 'Once per Position' block.

      However, I cannot get the Once per Position block to run.

      I have tested this on a separate project, so I understand it and it works as expected on a bare project. (eg when I set it to '3' trades, when 3 trades are open, the connected blocks run once).

      However, on quite a complex EA, I can't get the block to fire, no matter if I put it where I want it or at the top with no parent blocks. I am wondering whether the block ID has something to do with it? As it's the highest numbered block in the project.

      Anyone have any idea what I could be doing wrong?

      1 Reply Last reply Reply Quote 0
      • General Melchett
        General Melchett last edited by

        Actually - using the 'otherwise' output I can see block is firing. But when I set "How many trades?" to the exact number of trades I want (for example, 3rd trade) to execute following blocks at...nothing happens.

        But the 'otherwise' output fires before and after the 3rd trade, when it's set to '3'.

        Very strange.

        1 Reply Last reply Reply Quote 0
        • General Melchett
          General Melchett last edited by

          OK this is weird - I can get it to fire but only after 2 trades - then it fires once for EVERY trade.

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

            Could you please share the link to your project?

            (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
            • General Melchett
              General Melchett last edited by

              It's OK I solved the problem without using that block.

              Must've been an issue with what I was doing as with blank project that block worked fine.

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

                Good for you! 😉

                (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

                L
                K
                H
                N
                J

                17
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors