Help needed to understand a basic concept

Forums ProRealTime English forum ProOrder support Help needed to understand a basic concept

Viewing 3 posts - 1 through 3 (of 3 total)
  • #25500

    Hello everyone,

    I am just starting with prorealtime and starting with coding.

    I have read the manual, but I am a little confused as to how to access the high and low of a particular bar.

    Let’s say I want to trade the DAX and at 11:35am I want to find the high and low of the 5 minute bar and then trade LONG if the market breaks above the 5 minute bar at 11:35am, how can I do this?

    My biggest question is how to access a particular 5 min bar at a particular time. How can I access this information?

     

    Any help will be GREATLY appreciated!

    Kindest regards,

    Stefan

     

    #25742

    You may either:

    1) wait the time you want (within th 5-minute timeframe) and save both high and low values in two separate variables; of course the day you launch your strategy it’ll wait the next 11:35:00 candle which might be the nest day.

    2) being in a 5-minute timeframe you may access the required bar using brackets after high/low and computing the index based on the fact that an hour has 12 bars; you have to retrieve current time an then compute how many bars have elapsed since 11:35:00 and use that numer as an index (i.e. HIGH[32] and LOW[32] to access the values of the 32nd bar previous the current one). This calculation is not as straithforeward, but it allows not to have to wait the next day to retrieve desired data.

    Here is an example for option 1:

    Hope it’s what you you were looking for.

    #25985

    Hi Roberto – this really helps a lot!

    Thank you so much!

    Have a wonderful day ahead!

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

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