fxDreema

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

    Trade based on the current price compared to the last entry price?

    Questions & Answers
    2
    6
    1092
    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.
    • O
      onafets last edited by

      Hello forum,
      What is the block that opens subsequent trades (up to a max number) in the same direction of the first trade, based on the current price compared to the last entry price?

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

        The max number is controlled by... let's say "Check trades count".

        I don't know if this is even close to what you are asking for, but here it is - https://fxdreema.com/shared/ZDjQr6Tre
        New trade is created once a day - at 0:00. If there is no trade - a new Buy is created. If there is at least one trade and the current price is > from the open price of the newest trade - Buy is created. If the price is <, then Sell is created.

        1 Reply Last reply Reply Quote 0
        • O
          onafets last edited by

          __The max number is controlled by... let's say "Check trades count".

          I don't know if this is even close to what you are asking for, but here it is - https://fxdreema.com/shared/ZDjQr6Tre
          New trade is created once a day - at 0:00. If there is no trade - a new Buy is created. If there is at least one trade and the current price is > from the open price of the newest trade - Buy is created. If the price is <, then Sell is created.[/quote:vltt50md]

          Thank you fxdreema, I have added the condition "if trade"
          Here is for your information: https://fxdreema.com/shared/hAdOQnJJb

          Do you think the Action 2 does what says in the description?

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

            Look at my example again, block 11. You tend to prefer "If trade" blocks, but I used "No trade"

            If you ask me such queston, it means that you don't understand something. I don't want people to copy stuff from here and there thinking that it might work as they expect. I prefer you to understand what is going on, so better ask me if you don't understand something.

            "For each Trade" with value 1 set to "Not more than..." only loads the latest running trade, if such exists. Then in the next block I'm checking if the current price (Ask for Buys and Bid for Sells) is above or below the Open Price of that trade. Or I believe that it works that way :))
            I used "Chart model", which means that the block will pass if the current price (Ask for Buys or Bid for Sells) is above the open-price (+ Pips away, which is 0 in this case) of the trade, no matter if the trade is Buy or Sell. In the default "Trading model" calculations are mirrored for Sells.

            1 Reply Last reply Reply Quote 0
            • O
              onafets last edited by

              __Look at my example again, block 11. You tend to prefer "If trade" blocks, but I used "No trade"

              If you ask me such queston, it means that you don't understand something. I don't want people to copy stuff from here and there thinking that it might work as they expect. I prefer you to understand what is going on, so better ask me if you don't understand something.

              "For each Trade" with value 1 set to "Not more than..." only loads the latest running trade, if such exists. Then in the next block I'm checking if the current price (Ask for Buys and Bid for Sells) is above or below the Open Price of that trade. Or I believe that it works that way :))
              I used "Chart model", which means that the block will pass if the current price (Ask for Buys or Bid for Sells) is above the open-price (+ Pips away, which is 0 in this case) of the trade, no matter if the trade is Buy or Sell. In the default "Trading model" calculations are mirrored for Sells.[/quote:26e6isdb]

              Okay, I am starting to understand the logic behind it. Thank you for the additional explanation. I am going to elaborate my strategy in depth now.

              I wonder why when I go to convert the EA into calgo robot with http://2calgo.com/Home/Index#converted_indicator (for optimization porpoise)it says
              "It is MQ5 code.
              MQ5 code cannot be converted.
              Convert MQ4 code."

              When the EA is in MQ4 from fxdreema

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

                Maybe this converter is old. In the past MQL4 was very different than MQL5, but now many things are the same. I often update the code of the blocks and I always try to keep it as same as possible in both, MQL4 and MQL5 versions

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

                Online Users

                F
                C
                A
                E

                14
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors