Indicator plots forward 1 day " Solved "  [SOLVED]

Questions about MultiCharts and user contributed studies.
35trader
Posts: 11
Joined: 07 Oct 2013
Has thanked: 4 times

Indicator plots forward 1 day " Solved "

Postby 35trader » 18 Dec 2020

If I use the following Datestart and Datestop and set it to the same day, I get a chart update to 20200902, instead of a plot and data print of 20200901. Why does this plot on a chart 1 day forward with the following date inputs?

printout:
Date=20200902

Code: Select all

Inputs: DateStart(20200901), // YYYYMMDD DateStop(20200901), // YYYYMMDD Vars: FullDate(0), StartBar(0), DrawLine(False), once ClearPrintLog; FullDate = D + 19000000; // Start bar if FullDate = DateStart or FullDate > DateStart and FullDate[1] < DateStart then begin StartBar = Currentbar; DrawLine = True;
Last edited by 35trader on 18 Dec 2020, edited 1 time in total.

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

Re: Indicator plots forward 1 day

Postby TJ » 18 Dec 2020

Please add brackets to the following code:

Code: Select all

// Start bar if FullDate = DateStart or FullDate > DateStart and FullDate[1] < DateStart then begin

35trader
Posts: 11
Joined: 07 Oct 2013
Has thanked: 4 times

Re: Indicator plots forward 1 day

Postby 35trader » 18 Dec 2020

Please add brackets to the following code:

Code: Select all

// Start bar if FullDate = DateStart or FullDate > DateStart and FullDate[1] < DateStart then begin

if (FullDate = DateStart) or (FullDate > DateStart) and (FullDate[1] < DateStart) then begin


this did not solve the issue.

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

Re: Indicator plots forward 1 day " Solved "

Postby TJ » 18 Dec 2020

your brackets are inconclusive.

try harder.

35trader
Posts: 11
Joined: 07 Oct 2013
Has thanked: 4 times

Re: Indicator plots forward 1 day " Solved "  [SOLVED]

Postby 35trader » 19 Dec 2020

your brackets are inconclusive.

try harder.
Don't take this the wrong way, as your help and anyone else's here that assist in someone accomplishing a solution is very much appreciated.
But if I knew where the brackets should go, they would have been inputted. Telling someone it needs brackets does solve the root cause of them not knowing why and where the brackets (or otherwise) should go. Showing where the brackets go and defining why, provides the person asking a better chance of understanding and solving their root cause of not knowing.

The brackets were not the solution and now my root cause of not knowing the value of the brackets is still an unknown, because of the execution of your answer.

But I do appreciate your attempt to help me and I know you are an asset here, thanks again.

It's been solved.

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

Re: Indicator plots forward 1 day " Solved "

Postby TJ » 19 Dec 2020

( A or B ) and C

A or ( B and C )


Return to “MultiCharts”