fxDreema

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

    Isolating an indicator value

    Questions & Answers
    2
    7
    1716
    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.
    • I
      imagine2021 last edited by

      Lets say I wanted to use the Bollinger Band high point from any given period of time, say a calendar day based on my MT4 server, as a value in my code, but I wanted to use the high achieved on the 1 hour chart during that time. Is there a way to select this value the same way we can select a candle high point? If not, can you program this function in?

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

        This was asked so many times before. No, only direct values can be get from indicators. I also explain that indicators should do all calculations using data from candles and give signals to the EA when it's time to trade. The idea of the EA is to manage trades and orders with the help of indicators.

        1 Reply Last reply Reply Quote 0
        • I
          imagine2021 last edited by

          I don't know if this makes a difference, but I didn't mention that I wanted to use past values. I can look in my Data Window and see the value of the BB upper or lower band for any individual candle in the past on my 1 hr chart. Wouldn't that constitute a direct value that could be obtained by an EA function since it's fixed in the past? Then I would simply like my EA to be able to isolate the highest value achieved during the previous calendar day.

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

            Yes, and finding highest/lowest value in an array of values (candle's data or indicator's data, it's the same) is what normally indicators do. Indicators do calculations over arrays of data. Finding the highest value from the last 10 values (or the values of the last day) in an array is exactly that.

            The other way is to have Variable, monitor the indicator and set that Variable to the highest value. When the new day comes, reset and start again.

            1 Reply Last reply Reply Quote 0
            • I
              imagine2021 last edited by

              This is where I'm having the problem. Under Market Properties, I see I can isolate the highest point over a period of time (yesterday) which is what I want to do, however that's just the market pricing. These same options to find the highest point made by the upper Bollinger Band (or any indicator) during that same period of hours isn't there, and I can't find another way to do it. 😕

              In the example, my goal would be to draw an arrow on the chart if the price is currently below the high point of yesterdays Upper Bollinger Band, produced on the 1 hour chart. In a perfect world, I would just use the condition block as shown, and under More Settings set Timeframe to H1 since I need the BB data from the 1 hour chart. Then under Even More Settings (doesn't exist), I would choose the Highest Point (hours period) 00:00 - 23:59 with a Day Offset of 1.

              Otherwise, I've experimented with the Variables and Modify Variables blocks as you mentioned but can't figure out how to get all the needed data to link up as you described. Do you have any suggestions?

              https://fxdreema.com/shared/vj83N8Exe

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

                Ok, here it is: http://prntscr.com/925jux

                Note 1: "More settings" will be always automatically closed, this is something that I will fix somewhere in the future
                Note 2: There is no cache and it will slow down the backtest. If for example you search for Highest value in the previous day, the same calculations will be done every time, even if the result would be the same. To speed up things, I will suggest to use "Once per bar" or "Once a day". In other words, do these calculations only when they are needed.
                Note 3: These options are only for "My Indicators"
                Note 4: In the next days I can decide to make changes if I decide that I don't like something that I did.

                1 Reply Last reply Reply Quote 0
                • I
                  imagine2021 last edited by

                  Great that's awesome, thank you!

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

                  Online Users

                  D
                  V
                  O
                  J
                  B

                  11
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors