fxDreema

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

    how to get last candle id of an customindicators value != 0 ?

    Questions & Answers
    2
    4
    2027
    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.
    • bk7
      bk7 last edited by

      hey guys me again,

      this time i try to figure out how i can get the last candle id from an custom indicators buffer was not empty (0)?

      i know i could bring up 400-500 conditions that search for the last candle id, but i think there should be a quicker way?

      any suggestions are very welcome 🙂 thx guys

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        look through my post where I am refering how to work with Loop block ...

        Between trading and gambling is a very small gap, be careful.

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

          if you are referring to this post:

          https://fxdreema.com/forum/topic/4510/tutorial-loop-advanced-find-and-save-specific-value-from-indicator-history

          i know how to get the same result faster:

          0_1490281504269_Screen Shot 2017-03-23 at 16.01.18.png

          I am looking for an easy way to get the last candle id when an indicators buffer wasn't empty or zero. my easiest way i could think of is the following, but im not sure if it isnt to slow and how to stop the loop after the first candle id that meets the condition (buffer value != 0)

          https://fxdreema.com/shared/8PuNGzdrb

          1 Reply Last reply Reply Quote 0
          • M
            miro1360 last edited by miro1360

            yes that is true, thanks for notice, I have not seen it before, ... but you can not get values which are not in list (for this you need to ask admin if he will add new functions here) ... it was only example which can be modified into many forms (for non list values)

            note, that 0 is not always empty value (in metatrader) ... becuase default empty value for metatrader buffers is big integer number, or as EMPTY_VALUE ... but I think it can be set in indicator for another value using function SetIndexEmptyValue ...
            https://docs.mql4.com/constants/namedconstants/otherconstants

            this my next example show you nearest stochastic Candle ID which value is above 50 (count starts when current stochastic is below 50) ....
            I dont have your indicator so I can not give you specific example for your problem ... but I am sure you can do it 😄

            https://fxdreema.com/shared/6fcnY6k7

            0_1490297540364_upload-0170d47e-f9db-4ddc-99cc-588eab3b3cdc

            Between trading and gambling is a very small gap, be careful.

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

            Online Users

            M
            M

            8
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors