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

[amibroker] Re: Data cleansing / cleaning - removing bars



PureBytes Links

Trading Reference Links

You could also have just captured the scenario in a variable and kept your original code, except operating on the variable instead of repeating the test over and over again.

e.g.

BadBar = (O == H AND O == L AND O == C AND O == Volume);

Open = IIf(BadBar, Null, O);
Close = IIf(BadBar, Null, C);
High = IIf(BadBar, Null, H);
Low = IIf(BadBar, Null, L);

That would save you from making redundant IsNull function calls.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "only_accept_the_real_thing" <oman002@xxx> wrote:
>
> Thankyou Tomasz and Graham, that works!
> 
> Because the Open has been changed to Null after the first statement (if O==H==L==C==Volume) then O == H will be false so I've had to check for this in subsequent statements. The working code is:
> 
> Open = IIf(O == H AND O == L AND O == C AND O == Volume, Null, O);
> Close = IIf(IsNull(O), Null, C);
> High = IIf(IsNull(O), Null, H);
> Low = IIf(IsNull(O), Null, L);
> 
> Many thanks!
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> wrote:
> >
> > Hello,
> > 
> > Common coding mistake. You are using assignment (=) instead of comparision (==))
> > 
> > Should be:
> > Open = IIf(O == H AND O == L AND O == C AND O == Volume, Null, O);
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "only_accept_the_real_thing" <olivermannion@>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Saturday, August 15, 2009 2:08 AM
> > Subject: [amibroker] Data cleansing / cleaning - removing bars
> > 
> > 
> > > Hi there,
> > >
> > > I posted this intially to amibroker-afl but it doesn't appear to have been moderated and there's not much activity over there so 
> > > I've reposted here.
> > >
> > > What I would like to do is remove bars from my symbol that have open = high = low = close = volume.
> > >
> > > If possible I would not like to modify the source data files, but ignore these bars in the AFL code for my system. I've tried the 
> > > following in the AFL code to no avail:
> > >
> > > Open = IIf(O = H AND O = L AND O = C AND O = Volume, Null, O);
> > > Close = IIf(O = H AND O = L AND O = C AND O = Volume, Null, C);
> > > High = IIf(O = H AND O = L AND O = C AND O = Volume, Null, H);
> > > Low = IIf(O = H AND O = L AND O = C AND O = Volume, Null, L);
> > >
> > > Any help would be much appreciated! Thankyou!
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > **** IMPORTANT PLEASE READ ****
> > > This group is for the discussion between users only.
> > > This is *NOT* technical support channel.
> > >
> > > TO GET TECHNICAL SUPPORT send an e-mail directly to
> > > SUPPORT {at} amibroker.com
> > >
> > > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > > http://www.amibroker.com/feedback/
> > > (submissions sent via other channels won't be considered)
> > >
> > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > > http://www.amibroker.com/devlog/
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/