I seem to have run into a problem where my indicator is not getting enough data and is producing erroneous results without reporting insufficient data.
This indicator needs a varying amount of data given different conditions up to a maximum that I control. However I have set "use custom data range" within "format resolution" window to use in excess of what it needs and it still produces erroneous results. Moreover MaxBarsBack reports values of data available in excess of the indicator's maximum, and still errors are produced. To get the correct result custom data range needs to be set to about double the maximum, also setting SetMaxBarsBack explicitly produces correct results.
I'm using 8.8 RC.
I can't recall if 8.7 had the same issue.
Indicator data range detection within the scanner window
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Indicator data range detection within the scanner window
Hello Tom,
I'm not sure I understand the exact difficulty you have. Please elaborate.
Is the MaxBarsBack for the study set to Auto Detect or User Specified in Format->Study->Format->Properties?
What do you mean by "producing erroneous results without reporting insufficient data"?
Do you receive any error messages? Or the plots are incorrect?
I'm not sure I understand the exact difficulty you have. Please elaborate.
Is the MaxBarsBack for the study set to Auto Detect or User Specified in Format->Study->Format->Properties?
What do you mean by "producing erroneous results without reporting insufficient data"?
Do you receive any error messages? Or the plots are incorrect?
Re: Indicator data range detection within the scanner window
I used SetMaxBarsBack in code to adjust available data based on the indicator parameter I enter(this works correctly). Prior to this I tried setting "Use Custom Data Range" under the scanner resolution, and auto-detect methods.Is the MaxBarsBack for the study set to Auto Detect or User Specified in Format->Study->Format->Properties?
What do you mean by "producing erroneous results without reporting insufficient data"?
Do you receive any error messages? Or the plots are incorrect?
What I mean by "producing erroneous results without reporting insufficient data"? is that I do not get "Not Enough Data" message from the scanner or any other error, yet the values produced indicate that there was not enough data used.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Indicator data range detection within the scanner window
Tom,
What exactly is dynamically changed in your code? If the Length of some functions (like average, etc.) is changed then please limit it and set the max bars back value approx 10% more than your highest Length value.
What exactly is dynamically changed in your code? If the Length of some functions (like average, etc.) is changed then please limit it and set the max bars back value approx 10% more than your highest Length value.