Value at a specific time Yesterday

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #235788 quote
    phoentzsphoentzs
    Participant
    Master

    Hello, I needed a tip… I want to compare a value (close/high/low) at a certain time from yesterday with today. I can’t seem to get any further.

    if time=090000 then
    myclose=close
    endif
    
    if time=090000 and ???? then
    mycloseYesterday=close
    endif
    
    sig = myclose > mycloseyesterday

    This code needs to be completed. Anyone have any ideas?

    #235789 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    ONCE PriceToday     = 0
    ONCE PriceYesterday = 0
    if time=090000 then
       PriceYesterday = PriceToday
       PriceToday     = close
    endif
    sig = PriceToday > PriceYesterday
    phoentzs and Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Value at a specific time Yesterday


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
phoentzs @phoentzs Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
2 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/25/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...