fxDreema

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

    Coding Problem?? or FXDreema bug??

    Questions & Answers
    2
    8
    453
    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.
    • AlphaOmega
      AlphaOmega last edited by

      I have two similar codes, for Average buys and Average sells.
      For some reason the calculation gets mixed-up somewhere

      Group1
      Code for the buys: double lots = PositionGetDouble(POSITION_VOLUME);
      double openlvl = PositionGetDouble(POSITION_PRICE_OPEN);

      v::average_Buys = v::average_Buys + lots/v::total_lots*openlvl;
      }
      };
      Group2
      Code for the sells: double lots = PositionGetDouble(POSITION_VOLUME);
      double openlvl = PositionGetDouble(POSITION_PRICE_OPEN);

      v::average_Sells = v::average_Sells + lots/v::total_lots*openlvl;
      }
      };

      Notice the script in the Sells column.. Average Buys, which should be average Sells
      c2d57b1d-6858-42e2-9632-1f06089e2c80-image.png
      b9ef280b-257c-4a3f-a86f-9163393c00ad-image.png

      I get this error in the journal:
      2025.01.28 14:17:37.430 2024.07.12 11:35:24 Error: Invalid TP requested (55749.77880 for Ask price 1.08857)
      2025.01.28 14:17:37.430 2024.07.12 11:35:24 Error: Invalid TP requested (55749.77880 for Ask price 1.08857)

      This is my blocks for Buys:
      1751bb66-2077-45f9-b423-eb46b7e4b73a-image.png

      This is my blocks for Sells:
      f0f57b5f-93c2-430b-921f-5fda28518e5a-image.png

      So why would this happen? Is the another way to get a dynamic TP for group1 and 2 that will not interfere with each other?

      It gets worse when you have more trades running

      Help would be appreciated ... Thank you

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

        Add a shared link to see what happening

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        AlphaOmega 1 Reply Last reply Reply Quote 1
        • AlphaOmega
          AlphaOmega @jstap last edited by

          @jstap, thanks for answering .. https://fxdreema.com/shared/wd3u7XTDc
          Problem no1. The average buys and average sells get confused.
          Problem no2. The average ranges and gets bigger the longer the expert run
          Problem no3.. The correct writing in the right upper corner should read average Sells not average Buys

          If you could help it will be much appreciated

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

            Not sure what is creating any writing, strip this back and create smaller test projects, then what's wrong can be seen more easily, and by process of elimination, you remove anything that's causing the problems. You can then upload it so someone can help with 1 specific problem at a time.

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

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

              Hmmm! Thank you. I have done that... canot see a problem except if there is some way the expert see both sells buys, but because of the groups distinguish I do not see the how.. anyway.. I also split the expert in a buy only and sell only

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

                Add your link and I'll see if I can see the problem

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

                AlphaOmega 1 Reply Last reply Reply Quote 1
                • AlphaOmega
                  AlphaOmega @jstap last edited by

                  @jstap check previous .. I already gave you the link.

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

                    No mate that is your full project, I am talking about a test project to check sections, limit this to 1 problem, then sort the next, and then add them together to complete your project.

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

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

                    Online Users

                    F
                    B
                    T
                    E
                    R

                    26
                    Online

                    146.6k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors