MC 14 Difference between daysback and bars

Questions about MultiCharts and user contributed studies.
User avatar
strelow
Posts: 73
Joined: 20 Dec 2019
Location: Brazil-SP
Has thanked: 13 times
Been thanked: 3 times

MC 14 Difference between daysback and bars

Postby strelow » 23 Mar 2021

Question using Binance feed

With resolution 15 min:

If I select for instrument 4 "days back" or I select 384(4*60*24/15) bars in theory must be same quantity of data but my signal only works with I use “day back” for intraday e bars for “day” resolution.

Why this things happen ?

Thanks.

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

Re: MC 14 Difference between daysback and bars

Postby TJ » 23 Mar 2021

GIGO

User avatar
strelow
Posts: 73
Joined: 20 Dec 2019
Location: Brazil-SP
Has thanked: 13 times
Been thanked: 3 times

Re: MC 14 Difference between daysback and bars

Postby strelow » 23 Mar 2021

Sorry I will try explain again :

When you choose the data range you can select : change bars back or Days back

If I choose a period of 4 days with resolution of 15 minutes and for a instrument that run 24hours day like crypto is not same select

- 4 Days back

Or

- 384 bars back (4X60X24/15)

I must have the same behavior if I applied one signal in that conditional for both data range?

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

Re: MC 14 Difference between daysback and bars

Postby TJ » 24 Mar 2021

Have you checked your data
count your bars/ticks
to make sure in every 24 hours period
you have the same number of (60X24/15) bars ?

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: MC 14 Difference between daysback and bars

Postby Vlada MultiCharts » 29 Mar 2021

Hi strelow,

When you use Bars Back, a specific number of bars is plotted (384 in your case).
If you use Days Back - the days may include weekends, for example - in this case, the number of bars will be less than 384.

If your strategy requires a specific number of bars for calculation, the issue might be that there are not enough bars on the chart for the strategy to be calculated. You can check this either by increasing the number of Days Back on the chart or by decreasing your Maximum number of bars study will reference parameter in Format -> Strategy Properties -> Properties tab. If you have it specified in your code, you can decrease it in the strategy logic since the code logic will be considered dominant in relation to the Properties window.

User avatar
strelow
Posts: 73
Joined: 20 Dec 2019
Location: Brazil-SP
Has thanked: 13 times
Been thanked: 3 times

Re: MC 14 Difference between daysback and bars

Postby strelow » 30 Mar 2021

Hello Vlada

I choiced a Crypto intrument that run 24 hour and 7 days a week than Im my understand bouth options (day or bar ) must have the same result. I am right or not ?

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: MC 14 Difference between daysback and bars

Postby Vlada MultiCharts » 01 Apr 2021

Strelow,

Not exactly, there are many factors that may influence the number of bars if you select Days Back, such as session settings, holidays, the availability of data. If you'd like to have more precise data for the selected period, we recommend using From - To data range.


Return to “MultiCharts”