Thats also makes the code a lot more readable - thanks Mike.

--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> 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 [email protected], "only_accept_the_real_thing" <oman002@> 
> 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 [email protected], "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: <[email protected]>
> > > 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
> > > >
> > > >
> > > >
> > >
> >
>


Reply via email to