error with Intradaybarindex and Highest

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

    Why doesnt Highest allow me to use intradaybarindex as the bar count? It keeps throwing an error saying it needs a positive integer.

    Defparam DrawOnLastBarOnly = true
    //defparam calculateonlastbars = 1000
    
    nm = Intradaybarindex
    mx = Highest[nm](close)
    drawsegment(barindex[nm],mx,barindex,mx)
    drawsegment(barindex[nm],low,barindex,low)
    DRAWTEXT(intradaybarindex, barindex + 5, high, Dialog, Bold, 30) COLOURED(128,128,128)
    return
    #157641 quote
    robertogozzi
    Moderator
    Legend

    No index can be lower than 1, so change line 4 to make sure it is at least 1:

    nm = max(1,Intradaybarindex)
    Grantx 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

error with Intradaybarindex and Highest


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Grantx @grantx Participant
Summary

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

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