Return last market close

Forums ProRealTime English forum ProOrder support Return last market close

Currently, there are 1 user and 2 guests visiting this topic.
View all attachments
Viewing 2 posts - 1 through 2 (of 2 total)
  • #140581 Report

    I am trying to make some code to return the last market close (since DClose(1) seems to return the midnight close) to calculate the rate of change since last market close in ProOrder. I think the following code should work (trying to debug it by adding it as an indicator):

    but it is not… It seems like the numberOfBars ends up being “fixed” when used together with close[], so the last bar of gets the close of 173000 correct, but the second last gets 172700 which is not what I want. I want all bars to return the close of the last 173000.

    If I do “RETURN numberOfBars” then it correctly returns the number of bars since last 173000.

    What am I missing? Or is there some easier way to get the last market close?

    Thanks in advance!



    #140583 Report

    Try this:


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

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