plot yesterdays close  [SOLVED]

Questions about MultiCharts and user contributed studies.
moreno
Posts: 22
Joined: 29 May 2019
Has thanked: 19 times

plot yesterdays close

Postby moreno » 01 Sep 2021

Hi,
sounds silly but somehow didn't manage to plot yesterday's close line.
what is the relevant indicator/script I should use?

Moreno

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: plot yesterdays close

Postby TJ » 01 Sep 2021

How do you want to plot yesterday's close line?
Where do you want to plot yesterday's close line?

Please draw a mock up diagram with notes indicating the specifics.

moreno
Posts: 22
Joined: 29 May 2019
Has thanked: 19 times

Re: plot yesterdays close

Postby moreno » 01 Sep 2021

just like the indicator << Day Open-Hi-Lo Lines >>
I wish to draw yesterday's close line on today's chart as a reference.

thanks
Moreno

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: plot yesterdays close

Postby TJ » 01 Sep 2021

Try this

Code: Select all

Var: close1(0); if d>d[1] then Close1 = Close[1]; Plot10( Close1, "Close1");

moreno
Posts: 22
Joined: 29 May 2019
Has thanked: 19 times

Re: plot yesterdays close

Postby moreno » 01 Sep 2021

Thanks, TJ!
but...it seems to be good logic... but the script above doesn't work as expected.
the line is yellow in the 1m chart of ES.(attached)
the vertical part of it is day change. the line doesn't meet yesterday's close...

Image
Attachments
1.png
(227.09 KiB) Not downloaded yet

User avatar
Kate MultiCharts
Posts: 591
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: plot yesterdays close  [SOLVED]

Postby Kate MultiCharts » 09 Sep 2021

Hello moreno,

The yellow line corresponds to yesterday's close. You could try using Same as Instrument scaling and adjusting the script kindly provided by TJ to avoid zeros on the first bars:

Code: Select all

Var: close1(close); if d>d[1] then Close1 = Close[1]; Plot10( Close1, "Close1");

leety2008
Posts: 11
Joined: 26 Oct 2021
Has thanked: 2 times

Re: plot yesterdays close

Postby leety2008 » 11 Apr 2022

I have the same difficulty that I want to plot the "close" of yesterday's specific time on today's chart for reference. I used closeD(1) and that only get me the close at the end of last trading day. Please advise.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: plot yesterdays close

Postby TJ » 11 Apr 2022

I have the same difficulty that I want to plot the "close" of yesterday's specific time on today's chart for reference. I used closeD(1) and that only get me the close at the end of last trading day. Please advise.
You are looking for a specific time, not the close of the day.
Please start a new thread with a detailed description of what you are looking for.
Please include a mockup diagram(s) to illustrate your vision.


Return to “MultiCharts”