Thanks a lot Mike,

IsNull is working perfectly with the selection critera;
but I cannot get this writeif-thing working; if it prints something somewhere, 
I at least cannot find it...

I've tried a simple test, and the actual thing - in both cases I see nothing:

printf("Test");

printf(WriteIf(IsNull(EPSRank), "Warning: EPSRank data not available.","OK"));

I apologize for my stupidity as I am sure this is very simple...



--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> Try IsNull to recognize when the data is non existent.
> 
> http://www.amibroker.com/guide/afl/afl_view.php?id=216
> 
> If that works, you could use WriteIf as shown in the example of IsNull.
> 
> Alternatively, you could play with AlertIf to prompt you when it finds a null 
> value. Note, that you would probably only want to fire the alert once, so if 
> going that route you would probably want to use a static variable to track 
> whether or not the alert was fired.
> 
> Mike
> 
> --- In [email protected], "rise_t575" <rise_t@> wrote:
> >
> > Hi again,
> > 
> > Sorry for the strange title, but I unfortunately I don't know of a better 
> > way to express this...
> > 
> > I've just run a backtest of a time range pre-2000 with QP data and did not 
> > get one single trade (worked perfectly with post-2000 data).
> > 
> > I've isolated the problem, but I don't know of a way to solve this nicely.
> > 
> > I use a couple of criteria for the entry signal, which I have arranged for 
> > convenient access as parameters in the "Parameters" Window.
> > 
> > One of them is EPS Rank, and the QP database doesn't contain any EPS Rank 
> > data pre-2000. That's no problem for me right know, as I want to leave that 
> > criteria out of the picture for that backtest, so I've changed the Minimum 
> > EPS Rank parameter to >= 0, which essentially cancels that criteria out (or 
> > so I thought). But AB doesn't let me do it that way.
> > 
> > 1) Is there some way to change my code in a universal way (i. e. that I 
> > don't have to mess around with my code in the future for such cases) that 
> > ignores criteria for which there is no historical data?
> > 
> > 2) Additionally, a "perfect" solution for this would contain some form of 
> > warning when running the backtest. How could I accomplish this?
> > 
> > Thanks very much in advance!
> >
>


Reply via email to