How do i know what bar im using

Forums ProRealTime English forum General trading discussions How do i know what bar im using

Viewing 4 posts - 1 through 4 (of 4 total)
  • #207893

    Hi fellow coders,

    One problem I run into alot when I want to program a system is that I often don’t know which bar to use.

    Let’s say I use the 1 hour timeframe and a time session of 08-22. (intraday system) If I want to compare the last candlestick of yesterday’s close (within my time session) with today’s open (within my time session).

    What close[X] and open[X] do I use then? Is the open/close function adapting to my time session that i declared above or is it using the 24hour that comes with an 1hour timeframe view?

    Hope you understand my question since it confuses me alot 🙂

    #207895

    You can use Dclose() and Dopen(), 0 is the cirrent one, 1 is the previous day:

     

    1 user thanked author for this post.
    #207901

    If i do an example of the above,

    1. will Dclose(1) return the last bar of the tsession @ 22:00 or the bar at 24:00 ?
      2. will Dopen(0) return the first bar of the tsession @09:00 or the bar at 01:00 ?

     

    #208069

    Dopen and Dclose returns the default and official price of the market.

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

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