find the max close of the last 20 consecutive close-price of a stock

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #215457 quote
    gnellas77gnellas77
    Participant
    Average

    Hi Mr. Nicolas,

    i was wondering what is the syntax of arraymax command.

    For example i want to find the max close of the last 20 consecutive close-price of a stock.

    How do i syntax the command?

    Thank you!

    #215459 quote
    GraHalGraHal
    Participant
    Master

    Try …

    maxclose20 = Highest[20](Close)
    gnellas77 thanked this post
    #215460 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    ArrayMax, as defined at https://www.prorealcode.com/documentation/arraymax/,  will return the maximum value contained in all elemets af an array:

    MaxValue = ArrayMax($MyArray) //$MyArray is the array to be searched
    gnellas77 thanked this post
Viewing 3 posts - 1 through 3 (of 3 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

find the max close of the last 20 consecutive close-price of a stock


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
gnellas77 @gnellas77 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/30/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...