How to remove outliers in Neuro-Lab
Author: safwanvic
Creation Date: 5/1/2011 9:50 AM
profile picture

safwanvic

#1
Hi all,

I’m looking for a code to remove custom indicator outliers in Neuro-Lab. I’ve looked at the Filtering Training Data in the Help file (for loading only Thursday or Friday) and tried to edit it to suit but didn't work. I also looked through this forum for answers but the ones I found were for the previous NL version (if none is overlooked).

Anyway, e.g. in the ascii file, I’ve added two columns for “AB” ratio and "XZ" ratio. In NL, I’ve defined the DataSeries as ABSeries for the AB ratio and XZSeries for the XZ ratio, and they work fine as inputs to the ANN.

But, say I want to exclude those bars where AB ratio > 15, AB ratio < 3 or XZ ratio > 20. Could anyone help me with this? Any help would be very much appreciated. Thanks in advance.
profile picture

Cone

#2
Did you add the filter code to both the input and output scripts?

If so, please post the filter code and I'll take a look.
profile picture

safwanvic

#3
Hi Cone,

Yes I added the filter code to both the input and output scripts. Below is the code:
CODE:
Please log in to see this code.

An error message below will come out for both the input and output scripts:
QUOTE:
Runtime error: Object reference not set to an instance of an object.
at NL.ScriptExecute(WealthScript wealthScript)

I'm guessing NL will be filtering the AB ratio and XZ ratio from the ABSeries[bar] and XZSeries[bar], because if it is in WL, for a buy rule (for instance),
CODE:
Please log in to see this code.

will work OK.

I must be missing something / mistaken somewhere along the line in NL? Tq.

p.s: Also is it correct to filter out AB ratio > 15, AB ratio < 3 or XZ ratio > 20 using the above argument?
profile picture

Cone

#4
There's nothing wrong with the filter code, but we'd have to see the whole script to determine where the object ref. error is coming from. You can post it here or create a support ticket. It's up to you.

The first thing I'd check is if you instantiated an object named neuroLab (and not some other variable name like NL, NeuroLab, etc. ). If you followed the design pattern of the examples, that's probably not it though.
profile picture

safwanvic

#5
Thanks Cone, I'll create a support ticket for the matter.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).