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

Re: [amibroker] Re: Buy Error on Embeded coniditonal statement



PureBytes Links

Trading Reference Links

Tip --
The way to solve this type of problem is:
1.  Reduce your code to the absolute minimum, with the error still present.
2.  Post the actual reduced error producing code here.

That way we are all playing with the same cards.
-- Keith
BTW, more than half the time you will find the problem yourself during step 1.

tipequity wrote:

Graham

In my real system I noticed that I was getting buy signals on bars
that did not meet my conditions. I then ended up stringing the
elements of my conditions in one Buy statement. I then got the
correct buy signals. For example the buy statement from the example
below would become:
buy = Close > MA(close, 3) and Close>5 and Volume > 100;
the above buy statement produces correct buy signals but the
following wouldn't:

Cond1 = Close > MA(close, 3);
Cond2 = Cond1 and Close>5;
Cond3 = Volume > 100;
Buy = cond2 and cond3;

That is why I thought there must be an issue to using the condition
within another condition. Am I missing something?

ps. keep in mind the above example is used to illustrate my point may
not produce the error.

--- In amibroker@xxxxxxxxxps.com, Graham <kavemanperth@...> wrote:
>
> In what way is the signal you get wrong?
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
>
>
> On 14/04/07, tipequity <l3456@xxx> wrote:
> > I get erroneous buy signal when I use embedded conditional
statement.
> > For example:
> > Cond1 = Close > MA(close, 3);
> > Cond2 = Cond1 and Close>5;
> > Cond3 = Volume > 100;
> > Buy = cond2 and cond3;
> > Is there something that I am missing?
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___