Closed bar from yesterday at any time

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #125836 quote
    AE
    Participant
    Senior

    Hi,

    I´m working in a new proorder in TF 1minute. I would like to know how can I get the closed bar from yesterday at 17:30. I could count bars but is ugly. The worst problem with that it´s on Monday (PRT generate a bar on sunday) and sometimes I don’t have the same previuos bars than always.

    So, If today is Monday 9:00 AM I need to know the price close at last Friday at 17:30. If today is Thursday I need to know the price close at yesterday(Monday) at 17:30, etc…

    Any idea?

    Thanks

    #125837 quote
    Vonasi
    Moderator
    Master
    if dayofweek <> 0 and time = 173000 then
    lastclose = close
    endif
    AE thanked this post
    #125864 quote
    AE
    Participant
    Senior

    Thanks Vonasi, it works! But I don’t know why it doesn’t work on friday (to monday) if I change time to 235900.

    Any idea why?

    #125874 quote
    Vonasi
    Moderator
    Master

    If there is a 235900 candle then it will return a value. It works fine for me on the DJI except for this last weekend as there was no trading on Good Friday.

    Also the 235900 will not be the close of the day – it will be one minute before because TIME is the closing time of a candle.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Closed bar from yesterday at any time


ProBuilder support

New Reply
Author
author-avatar
AE @alberto_aguilera Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Vonasi
5 years, 9 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 04/12/2020
Status: Active
Attachments: No files
Logo Logo
Loading...