join variable values

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #157235 quote
    GrantxGrantx
    Participant
    Average

    Is there a way to join date time values together? eg

    mydateopen = OpenDate + OpenHour

    mydateopen = OpenDate & OpenHour

    Neither of these work. For each day I have specific session times so need that days first bar opening time and last bar closing time.

    #157243 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Try that on a pocket calculator:

    OpenDate  20200110 + Jan.10th
    OpenHour               23 = 11pm
    .                    20200133 =Jan.33rd

    Your second example uses a logical operator with numbers, can’t work!

    #157250 quote
    GrantxGrantx
    Participant
    Average

    ok, so no way to concatenate?

    Is there tostring() functionality or similar?

    #157253 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    No, they are considered as numbers, so you need to shift them by multiplying them.

    Adding, say, 1 year to a date is possible, but you have to multiply 1 by 10000 to skip days and months:

    date  20210111 +
    year         10000 =
    .          20220111

    Grantx thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

join variable values


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Grantx @grantx Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/10/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...