Difference between Last and Close[0]?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #92701 quote
    WimWim
    Participant
    Average

    I am at my first step in programming a screener and already puzzled by some confusing results. I am doing some coding and testing on a saturday for an exchange that closed friday. So I would think that Close[0] would give the same price as the standard column “Last” in the screener results window. But no. “Last” is showing the closing price of last friday (as expected), but Close[0] is giving the closing price of thursday when in Daily and Friday one whole week ago when in Weekly. Close[1] is then of course giving the price of 2 days (in Daily) and 2 weeks (in Weekly) ago.

    I tested this with this “exercise” part of code, where I exchanged the display part of the screener command for Close[1] and Gain and stuff.

    // sample screener code - pogramming exercise
    Gain = (Close[0] - Close[1])/Close[1]*100
    SCREENER [Gain > 0](Close[0])

    Probably a foolish beginner mistake, but I cannot find a formal explanation in the manual. Thanks for your “verdict”, Wim

    #92703 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Do you have end-of-day data?

    #92705 quote
    WimWim
    Participant
    Average

    Yip. end of day. That’s why I am testing on Saturday.

    #92714 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    On my PRT platform (end-of-day) data are correctly reported, both on Daily and Weekly TF’s.

    xDaily.jpg xDaily.jpg xWeekly.jpg xWeekly.jpg
    #92720 quote
    WimWim
    Participant
    Average

    Your Daily/Adidas example looks OK. “Last” and “Crite.” (being Close[0]) are both 215.90.

    But your Weekly/Muench example shows different values for “Last” and “Crite.” (being Close[0]), 208.50 resp. 206.4. The latter value being the close of the week before!

    I guess it has to do with the availability of end of day data when using a free subscription. In Daily-mode the Friday-close is available already on Saturday (the next day). In Weekly-mode the Week-close is probably available on Monday (the next week). Will test that Monday morning. How about that idea? Bizar, however, that the column “Last” in ProScreener shows the correct Friday-close as well as the correct Week-close.

    Thanks for testing on your side!

    #92735 quote
    NicolasNicolas
    Keymaster
    Legend

    End of day is “end of week” for a weekly timeframe.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Difference between Last and Close[0]?


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Wim @wim Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by NicolasNicolas
7 years, 7 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/02/2019
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...