fxDreema

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

    How to register values ​​of variables Candle: Buy, Sell, low

    Questions & Answers
    2
    14
    2237
    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.
    • B
      BestTrader last edited by

      Hello, I want to know, after a trade, how to register values ​​of variables Candle: Buy, Sell, low, high?

      How to create the variables?

      Thanks in advanced

      Good trades 😉

      Jose

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

        This one probably can help: http://fxdreema.com/demo/mt4-variables

        1 Reply Last reply Reply Quote 0
        • B
          BestTrader last edited by

          I appreciate the quick response.

          But already studied this example, but these variables do not define me the purchase price, sale, low and high 😞

          and thank need more help please

          Jose

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

            Then this one: http://fxdreema.com/demo/mt4-loop-how-it-works

            Using "For each Trade" you can load the last trade only if you have "Not more than n trades" set to 1. Then you can check that trade's parameters using Condition - find (in loop) category there.

            1 Reply Last reply Reply Quote 0
            • B
              BestTrader last edited by

              Thanks, but this block can not know about the values ​​of the candle (opening, closing, maximum and minimum) of the trade that this operation?

              I think every trade, I write the variables, referring to the amount of sail, opening, closing, high and low, and then you can use later ...

              How do I do that?

              Jose

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

                Every trade has information associated with it, attributes, parameters - lot size, type, sl, tp, open price, open time and others. Candles have these: open, high, low, close, time. I don't fully understand what you want to do with these? To get candle parameters of that candle where the trade was created?

                1 Reply Last reply Reply Quote 0
                • B
                  BestTrader last edited by

                  Yes, i want to get candle parameters of that candle where the trade was created!

                  I want to compare the values ​​with other candles candle that was made the trade.

                  To do that I need to record the values ​​in variables, and then compare.

                  But as I record the values ​​of the 4 variables that the trade was made? (buy, sell, low and high)?

                  Jose

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

                    If you want to know how to record variables, this is something on it's own, and I posted example of this. You can define variables and then modify them with any values, this is easy... but if you work with multiple trades at a time it's not useful.
                    The way to do this is: based on the open time of the trade to find the candle that is located at that time and get it's parameters, but at the moment in fxDreema there is no something that you can select directly, but I can try to add something like this because it's not a bad idea. The problem is because there are 3 steps:

                    1. Get Open Time from the trade
                    2. Use that time to find the ID of the candle around this time, here you need to specify Market and Timeframe.
                    3. Knowing the candle ID we can get high, low, open or close.
                    1 Reply Last reply Reply Quote 0
                    • fxDreema
                      fxDreema last edited by

                      Directly as a code, if I am not wrong, it's something like this:

                      iLow(Symbol(), 0, iBarShift(Symbol(), 0, OrderOpenTime()))
                      
                      1 Reply Last reply Reply Quote 0
                      • B
                        BestTrader last edited by

                        I really need an indication of how these variables the trade register in which values ​​(open, closed, maximum and minimum), for example the variables do not have this example, but lots of values​​, and I can not define.

                        I know this is a simple example, so I ask can you please help me because without it I can not advance my strategy, thank you.

                        Jose

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

                          I'm lost again 🙂 For me variable is something that is defined and has value. Now I'm not sure if you want to get these values that I though you want... do you want (for example) to get Low of the candle where the trade is/was opened?

                          1 Reply Last reply Reply Quote 0
                          • B
                            BestTrader last edited by

                            yes, please...

                            Jose

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

                              Can you try with the code I posted before?

                              iLow(Symbol(), 0, iBarShift(Symbol(), 0, OrderOpenTime()))
                              ```#
                              here Symbol() means the current symbol, 0 means the current timeframe. iLow returns Low of the candle with ID that is get from iBarShift() function. OrderOpenTime() is the open time of the currently loaded trade, so I guess "For each Trade" block should be used to load trades.
                              
                              I even doubt if it's a good idea for me to add such a parameters. I can probably make it possible to get candle data not only from candle ID, but also from candle Time, but then you still need to get the trade's open time.
                              
                              I think that you are trying to do something in the hard way. Whan do you want to do with these candle levels, isn't it ok to just set SL or TP or pending orders at these levels when they still belongs to the current candle (0)?
                              1 Reply Last reply Reply Quote 0
                              • B
                                BestTrader last edited by

                                I'll study the best strategy and routines, then you need more help, I ask you. Thanks

                                Good Trades 😉

                                Jose

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

                                Online Users

                                P
                                E
                                O
                                C
                                X
                                Q
                                P
                                A
                                E
                                B
                                Q

                                18
                                Online

                                146.9k
                                Users

                                22.4k
                                Topics

                                122.6k
                                Posts

                                Powered by NodeBB Forums | Contributors