Reference a candle by time or timestamp

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #223194 quote
    Gopherzine
    Participant
    New

    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 quote
    JS
    Participant
    Senior

    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)
  • You must be logged in to reply to this topic.

Reference a candle by time or timestamp


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Gopherzine @gopherzine Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JS
2 years, 3 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 11/04/2023
Status: Active
Attachments: No files
Logo Logo
Loading...