PREVIOUS HIGH, LOW & CLOSE INDICATOR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31288 quote
    Henry
    Participant
    Average

    A request that was addressed to ProRealTime:

    I want a method to get the “PREVIOUS HIGH, PREVIOUS LOW & PREVIOUS CLOSE” of previous year.

    Suggestion for an anwser:

    You must select the data from the beginning of last year

    once currenthigh=high
    once currentlow=low
    
    once previousclose=undefined
    once previoushigh=undefined
    once previouslow=undefined
    
    if openyear <> openyear[1] then
    previousclose=close[1]
    previoushigh=currenthigh
    previouslow=currentlow
    currenthigh=high
    currentlow=low
    else
    currenthigh=max(high,currenthigh)
    currentlow=min(low,currentlow)
    endif
    
    return previoushigh as "previous year high",previouslow as "previous year low",previousclose as "previous year close"


    #31314 quote
    donaldthetrader
    Participant
    Average

    Thank you so much @Henry

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

PREVIOUS HIGH, LOW & CLOSE INDICATOR


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Henry @henry Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by donaldthetrader
8 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/06/2017
Status: Active
Attachments: No files
Logo Logo
Loading...