Hello
Indicator property: Could we set from the code the value for :Max number of bars study will reference
Martin
Indicator property: Is it possible to set # bars a study will reference [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Indicator property: Is it possible to set # bars a study will reference
Hello
Indicator property: Could we set from the code the value for :Max number of bars study will reference
Martin
This might sound insensitive, but why would you want to do that?
Re: Indicator property: Is it possible to set # bars a study will reference
Hello TJ
The problem is that one my indicator is creating too many little trendlines when I use it with a very time scales. It then cause my new indicator that draw trendlines to bust an area created to keep trendlines information.
The problematic indicator is only use to draw trendlines for the upper and lower price of the Asian sessions. I don't need to go many days back for it to be relevant.
I could always rewrite the indicator, but,,,,,,
Martin
The problem is that one my indicator is creating too many little trendlines when I use it with a very time scales. It then cause my new indicator that draw trendlines to bust an area created to keep trendlines information.
The problematic indicator is only use to draw trendlines for the upper and lower price of the Asian sessions. I don't need to go many days back for it to be relevant.
I could always rewrite the indicator, but,,,,,,
Martin
- Attachments
-
- Asian sessions.png
- (44.61 KiB) Downloaded 658 times
-
- Max Bars References.png
- (26.31 KiB) Downloaded 658 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Indicator property: Is it possible to set # bars a study will reference [SOLVED]
You have a misunderstanding of MaxBarsBack.
I thought we have gone through this before.
MBB is a nisnomer.
MBB is a chart level setting -- it determines how many bars the indicator needs to do a proper calculation.
MBB is NOT about how far the indicator goes back from the current bar.
eg.
For a 10 period moving average, the MBB is 10.
Because it takes 10 bars to do a proper 10 MA calculation.
I thought we have gone through this before.
MBB is a nisnomer.
MBB is a chart level setting -- it determines how many bars the indicator needs to do a proper calculation.
MBB is NOT about how far the indicator goes back from the current bar.
eg.
For a 10 period moving average, the MBB is 10.
Because it takes 10 bars to do a proper 10 MA calculation.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Indicator property: Is it possible to set # bars a study will reference
Though you've seem to have fixed it in a different way looking at your last post , you can set the number of bars an indicator will reference with the SetMaxBarsBack() keyword.Indicator property: Could we set from the code the value for :Max number of bars study will reference