Lowest function (excluding current candle)

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

    Hi all,

     

    Have a qn:  does the lowest function include the current candle?  So example, if current day is Monday, and I want to find the lowest daily price last week, so I have to do lowest (6).  But the problem is lowest (6) will consider current low also.  I just want to consider the low between last monday , tues,wed,thurs,fri.  How do I go about defining this pls?

     

    Tks

    #174116 quote
    robertogozzirobertogozzi
    Moderator
    Legend
    Lowest[5](low[1]) //or Lowest[5](low)[1]
    phanz thanked this post
    #174160 quote
    phanzphanz
    Participant
    Average

    Thank you very much.  Now I am able to replicate the Donchian Upper and Lower Bands (blue dots)

    However, what I really want to find out is to create a narrower band of the Donchian, but keep the overall trend lines.  I use the code below.  Although the band has narrowed red dots, the look of the tighter band does not exactly match the Donchian bands.  Any advice on how I should modify my codes to correct this?   The codes are below and I have also attached the screenshot.  Thank you very much.

     

    LBand = lowest[interval](low[1]) // same as Donchian Lower Band
    UBand = highest[interval](high[1]) // same as Donchian Upper Band

    diffBand = (UBang-Lband)/Bfactor

    LBandNew=LBand+diffband
    UBandNew=UBand-diffband

    return LBandNew,UBandNew, LbandOrig, UBandOrig

    [attachment file=”WhatsApp Image 2021-07-26 at 1.25.57 PM.jpeg”]

    #174161 quote
    phanzphanz
    Participant
    Average
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

Lowest function (excluding current candle)


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
phanz @phanz Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/25/2021
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...