fxDreema

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

    New User help Please

    Questions & Answers
    2
    8
    905
    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.
    • S
      saintalan last edited by

      I have looked at the example for "Buy-Sell-Buy-Sell on opposite conditions" and understand it, however I would like to do something similar but with the option to Close a trade on other conditions prior to the reversal/new trade.

      So I would need to check for any trade that's running.

      This is my first attempt but it does not work properly.

      https://fxdreema.com/shared/JXEqfIrXc

      Can you help me to understand?

      Many Thanks

      Alan

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

        In block 26 it's checked for Buys and Sells. In block 27 you have SL and TP. The sell side does not match the buy side 🙂

        1 Reply Last reply Reply Quote 0
        • S
          saintalan last edited by

          Thanks fxD,

          I had corrected that but since have learned a little more and got it working by keeping Buy Sell sides different under their own 'Once Per Bar'.

          I am still a little confused over the Events. The onTick event I am using has the 'Once Per Bar' blocks in them. When does that Block action? On the Close of Bar or Open of next. In other words if I want to use the (most recent) Closed Bar for a Condition will that always be Candle 1 ?

          I'm sure it wont be long before I upgrade.

          Many Thanks

          Alan

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

            on Tick = blocks run on every tick.

            Once per bar under on Tick = passes once when a new bar is created, on the first tick of the new bar. I tried to explain the problems with the "On Close of Bar" problems here - https://fxdreema.com/help/-/working%20w ... e%20closes

            At any time, you can get the value of any candle - open, high, low or close... or even highest and lowest values within some period

            1 Reply Last reply Reply Quote 0
            • S
              saintalan last edited by

              Thanks again, I am learning a lot just trying things and testing them.

              You mention I can get candle values at any time. How do I do this? Do I have to count back the candles to the one I want or can I just save a price to a variable?

              Cheers

              Alan

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

                Yes. There is this setting called Candle ID. 0 is the current candle, 1 is the previous and so on. Also, candles can be selected by time. You can see that property "Find Candle by". But when possible, find candles by ID.

                1 Reply Last reply Reply Quote 0
                • S
                  saintalan last edited by

                  Thanks, sometimes it would be easier just to save a price, say CLOSE, I assume I can save that to a variable?

                  Thanks again

                  Alan

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

                    You can save everything in variable, but candles data is available immetiately after the EA is loaded, it's just there and there, it's like fruits in a tree 🙂

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

                    Online Users

                    E
                    H
                    R

                    10
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors