fxDreema

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

    Finding the most recent candle close high point

    Questions & Answers
    2
    4
    1243
    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.
    • A
      adamghous last edited by

      0_1525291330026_Example.jpg

      Hey,

      Hopefully someone can help or point me in the right direction.

      I want my EA to recognise the most recent candle close high ( as represented on the image as EP). When price crosses the EP it will trigger a buy trade in this example with the SL being set at the latest candle low. This could occur over n number of candles which is why i need it to specifically find the latest ones to enter on.

      The yellow line in the image is the 1SMA (based on closed price) which i thought could be used as an aide to get this going but essentially you just end up hitting the same roadblock as if you were just using OHLCs.

      Any help or examples appreciated.

      Adam

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

        I'm not 100% I understood what you are after, but hope this will help you forward.
        The logic is just for the last high close: https://fxdreema.com/shared/sQdd6Ilqb
        0_1525292842475_a9b50a70-6af8-4384-a82e-34c6d58c506c-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

        1 Reply Last reply Reply Quote 0
        • A
          adamghous last edited by

          Thanks for the work through it is very helpful. However what about if the highest close price was 3,4...10 candles back as oppose to only 1 candle back?

          This is to say that Im looking to enter a trade on the last swing high in terms of candle closing prices (as oppose to actual candles highs which would be the norm). The yellow 1SMA shows the swing highs quite well. I need the EA to recognise what the price of the latest swing high is so that I can enter a trade on price crossing that level.

          1 Reply Last reply Reply Quote 0
          • A
            adamghous last edited by

            Thanks to your example i think ive cracked it. Just had to have the EA recognise the pattern of lower close-higher close-lower close and then remember the value of Candle Shift 2 for the higher close. Once that was stored in the variable I could use that value as an entry point. https://fxdreema.com/shared/uonU4E21e

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

            Online Users

            G
            T
            J
            G
            C
            N
            A

            13
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors