fxDreema

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

    Candle ID for ATR indicator

    Questions & Answers
    2
    3
    802
    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.
    • T
      tanjiayi1 last edited by

      Hello! Can someone enlighten me in this -I have an EA which will enter a trade upon the start of a new candle based on ATR. Is my understanding correct that-

      1. if the candle ID for my ATR indicator is 1 (previous candle), the EA will refer to the ATR value of the previous closed candle?

      2. if the candle ID for my ATR indicator is blank (0 by default, means current candle), the EA will refer to the ATR value of the current forming candle?

      3. if point 2) is true, since my EA only opens once per bar at each start of a new candle (and never in the middle of a forming candle), this means that the ATR value referred to in point 2) will be the one at the very point when the new candle just formed?

      Many thanks in advance!

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @tanjiayi1 last edited by

        @tanjiayi1 Here in short ...

        1. right
        2. also right, but as you are at the very begining of the candle, the result is wrong. If you have a period of let's say 14 it can make a slight difference especially on a daily chart. If you use period 200 or something like that, it won't matter that much. But by principle you should work with closed candles - meaning candle ID1.
        3. Well, I think I answered that in 2 already, but from calculation perspective assuming your ATR period is 14, using candle ID0 means calculation of 13 full candles and 1 with almost no move when you EA opens the trade or checks the condition.

        I like to share my knowledge, but expect the others to contribute as well.

        1 Reply Last reply Reply Quote 2
        • T
          tanjiayi1 last edited by

          wow got it, thanks so much for the detailed explanation, this really helps!!

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

          Online Users

          K
          M
          B
          A
          C
          A

          19
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors