Get higher and lower value previous day

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #74850 quote
    xaji
    Participant
    Average

    Hi,

    I am working on a chart showing 1 hour candle and I would like to know if exists some way to get this previous day info, I need to get the first candle higher value on the previous day, and second candle lower value on the previous day.

    I mean, for example on Germany 30 DAX and using 1 hour candlesticks:

    -the day would start at 9 a.m. , so I would need the highest value of this candle on the previous day

    -and then I would need the lowest value of the candle showed at 10 a.m. on the previous day as well

    Thanks in advance,

    Javier

    #74875 quote
    robertogozzi
    Moderator
    Master
    ONCE YesterdayHigh = 0
    ONCE YesterdayLow  = 0
    ONCE TodayHigh     = 0
    ONCE TodayLow      = 0
    IF time = 090000 THEN
       YesterdayHigh = TodayHigh
       TodayHigh     = high
    ENDIF
    IF time = 100000 THEN
       YesterdayLOw  = TodayLow
       TodayLow      = low
    ENDIF
    // at this point YesterdayHigh and YesterDayLow will retain yesterday's highese and lowest values at that time
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Get higher and lower value previous day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
xaji @xaji Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
7 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/29/2018
Status: Active
Attachments: No files
Logo Logo
Loading...