[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: Validating number of data points..



PureBytes Links

Trading Reference Links

I don't quite understand what you are trying to do but you might find
this useful.

    if Currentbar = 1 then begin
       NDays = LastCalcJDate - DateToJulian(Date);
    end;

The variable, "NDays", will contain the number of days in the data
from CurrentBar = 1 (which is the first bar after the MaxBarsBack
interval) to the last bar on the chart.

Bob Fulks



At 10:09 PM -1000 8/8/01, Pang, Eddie wrote:

>This will probably be helpful to new users also...
> 
>Anyone know of a easy way to validate the number of data points
>available in globalserver to what is required in your study.  That is,
>If your study requires a minimum of 50 bars for a evaluation, and lets
>say you only have 35 days worth of data in global server.  This check
>will force a text to be printed instead of force calculation with the 35
>data points.
> 
>pseudocode:
>  validate minimum datapoints required for calculation
>  if not minimum print text and exit.
> 
>I've tried using Maxbarsback in the properites, but for some reason, it
>still calculated my equation with the 35 points verse the full 50
>points.
> 
>Thanks in advance...
>eddie :)
>