Reference a candle by time or timestamp

Forums ProRealTime English forum ProRealTime platform support Reference a candle by time or timestamp

  • This topic has 1 reply, 2 voices, and was last updated 1 year ago by avatarJS.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #223194

    Hi, Is it possible to reference a candle by time OR access a timestamp for a specific candle?

    The reason I ask, is I have a strategy that works well on Indices, however, sometimes the candle I use at a specific time as a reference doesn’t exist. This presents a challenge if blindly counting back candles from now to the reference time and changes how the strategy is executed.

    #223204
    JS

    Hi,

    I don’t think time, or a timestamp will help you determine whether a particular reference exists…

    Suppose you work with a daily time frame and you always want to look back two weeks, you can of course use Close[10] as a reference…

    Or, for example, for a fixed reference:

    If Reference=0 then

    ReferenceBar = BarIndex – 10

    Reference=1

    EndIf

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login