When you place data on a chart, you can specify that X number of days back are loaded, which then ensures that you have sufficient data with which to calculate a particular indicator that you place on a chart.
Is it possible to do the same thing when indicators are placed on the scanner? Right now, I have an indicator that requires X number of days of intraday data be loaded before it can calculate an indicator.
How do you make sure that the minimum amount of data required is available for these calculations?
Ensuring Sufficient Data Loaded For Indicator On Scanner [SOLVED]
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Ensuring Sufficient Data Loaded For Indicator On Scanner
No, you cannot have any reference to amount of DAYs of plotted INTRADAY data series. Script can only count actual number of bars.
If you know for example that per 10 days you have ~10 000 of bars, you can make something like the following indicator:
If you know for example that per 10 days you have ~10 000 of bars, you can make something like the following indicator:
Code: Select all
Var: X(500);
If symbol_length < X then plot1("The data series length is less than X of bars");
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Ensuring Sufficient Data Loaded For Indicator On Scanner
Thank you for your response. Let me rephrase my question: can you force the scanner to load a specific number of bars so that it has sufficient data to calculate an indicator?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Ensuring Sufficient Data Loaded For Indicator On Scanner
This can be possible only in MC .NET, not in the regular MultiCharts. In regular you will need to change data series length manually, that's why i suggested that indicator.
- furytrader
- Posts: 354
- Joined: 30 Jul 2010
- Location: Chicago, IL
- Has thanked: 155 times
- Been thanked: 217 times
Re: Ensuring Sufficient Data Loaded For Indicator On Scanner
I'm confused, how do you change the data length manually when it comes to the scanner?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Ensuring Sufficient Data Loaded For Indicator On Scanner [SOLVED]
Take a look at the attached picture, please.
- Attachments
-
- Capture.PNG
- (24.96 KiB) Downloaded 561 times