fxDreema

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

    About last x candle

    Questions & Answers
    2
    3
    532
    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.
    • G
      Gauss last edited by

      Hello. I created an EA and I want to ask that; for example candle ID:1 > MA 50 = BUY or candle ID:2 > MA 50 = BUY or candle ID:1 > MA 50 = BUY etc...
      My question is ; for example i want to get last 50 candles like this. Do I write the candle IDs one by one? Isn't there a short way to get the last 50 candles?

      jstap 1 Reply Last reply Reply Quote 1
      • jstap
        jstap @Gauss last edited by

        @gauss You may need custom code to do this, I do have a loop that will count the amount of candles above and below a MA, download and run on tester so you can see how it works, the two blank conditions are to put somewhere like the buy/sell trees

        Hope this helps:

        https://fxdreema.com/shared/t5dLu8Usd

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 1
        • G
          Gauss last edited by

          Actually, I meant: I'm going to define a variable and whatever value I enter into that variable it will get the back candle. for example if I type 20 it will take all the last 20 candles. If any of these 20 candles fit the conditions, the trade will be triggered...

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

          Online Users

          M
          G
          D
          A
          A
          R

          17
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors