fxDreema

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

    Please teach me why the Close Trades didn't work

    Questions & Answers
    2
    5
    1228
    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.
    • Pei
      Pei last edited by

      I set some conditions for closing trade.
      Candle ID 1 close>BBand lower band>Candle ID 1 open, then close trade.
      I connected the blocks like this:0_1551620224686_螢幕截圖 2019-03-03 21.18.49.png

      But after I check the resul of backtesting, I found out close trades didn't work.
      0_1551620728513_螢幕截圖 2019-03-03 18.02.32.png
      The bull candle I mark as yellow circle fits the close trades conditions: Candle ID 1 close>BBand lower band>Candle ID 1 open. But the trade wasn't closed.

      Is there anybody could kindly teach me on which part I made mistake?
      Really appreciate.

      roar 1 Reply Last reply Reply Quote 0
      • roar
        roar @Pei last edited by

        @pei Hi!
        I don't see any mistake in the blocks overview. Perhaps there is some small setting wrong.
        Maybe your "if trade" counts only buys?
        How about the "close trades", is it filtering only buys?
        Did you remember to use ID1 in all calculations, candle ID and bollinger ID? The bollinger indicator ID is hidden in the "more settings" section:
        0_1551623256786_95c0c498-5ef1-4574-ac19-3a83d6e853e5-image.png

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        Pei 1 Reply Last reply Reply Quote 0
        • Pei
          Pei @roar last edited by

          @roar Thank you so much. I set "if trade" as" either buys or sells", I think it makes sense. Also same setting for "close trade". I hink the issue is I didn't use ID 1 in bollinger, I never knew that, thank you so much for teaching me. I coreect it and did backtesting again. Seems it worked. But I have another question, what should I do if I want to clse the trade at candle ID 1 close price?

          0_1551632769960_螢幕截圖 2019-03-04 00.57.21.png
          So whenver I use bollinger in conditions, I have to get into "more setting" to set the candle ID, right?
          It's so kind of you. I really appreciate.

          roar 1 Reply Last reply Reply Quote 0
          • roar
            roar @Pei last edited by

            @pei
            Well, you use "once per bar", so the EA only checks the candle open. ID 1 means history (first history bar), you can't decide to close your trades at a history time, you see.

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            Pei 1 Reply Last reply Reply Quote 0
            • Pei
              Pei @roar last edited by

              @roar Understood. Thank you so much.

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

              Online Users

              R
              A
              E

              14
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors