I knew there was an obvious reason. This goes back to when I was asking how to get your custom indicator recognized by Amibroker as the built-in indicators like RSI and ADX are. It's not a big deal, but it would save some cut and paste time.
 
Thank you for your help.

Graham <[EMAIL PROTECTED]> wrote:
you have used CI like a function, this is not required as this is a variable with values already calculated

Buy = Cross (High, BuyUpper) AND  CI >CIFilterVal;

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 07/09/06, James <jamesmemphis@yahoo.com> wrote:
Graham,

Sorry for the delay, I was in New Orleans for Labor
Day weekend. Here is the complete formula I have so
far:

/* Simple Dual Donchian system with a filter
*/
_SECTION_BEGIN("CI");
//This section computes the Custom Indicator
CIperiods = Param( "CI Periods", 14, 1, 30, 1 );
ATRSUM = Sum (ATR(1), CIperiods);
RANGE = HHV (High, CIperiods) - LLV (Low, CIperiods);
CI = 100 * (ATRSUM/RANGE) / (CIperiods);

_SECTION_END();

CIFilterVal = Param("CI Value", 25, 10, 90, 1);

EntryBars = Param("Entry Bars", 15, 1, 30, 1);
ExitBars = Param("Exit Bars", 5, 1, 30, 1);

BuyUpper = HHV(Ref(H,-1),EntryBars);
SellLower = LLV(Ref(L,-1),EntryBars);

StopUpper = HHV(Ref(H,-1),ExitBars);
StopLower = LLV(Ref(L,-1),ExitBars);

Buy = Cross (High, BuyUpper) AND  CI(CIperiods) >
CIFilterVal;
Sell = Cross (StopLower, Low);

Short = Cross (SellLower, Low) AND ADX(CIperiods) >
CIFilterVal;
Cover = Cross (High, StopUpper);

BuyPrice = Max (BuyUpper, Open);
ShortPrice = Min (SellLower, Open);
SellPrice = Min (StopLower, Open);
CoverPrice = Max (StopUpper, Open);

PositionSize = MarginDeposit;

If you look at the Short rule, I switched CI with ADX
to demonstrate my problem. In these two entry rules,
if I switch CI to ADX turns blue and I get no syntax
errors. If I replace ADX with CI, I get syntax errors.
Apparently, AB does not regonize my formula for CI as
an indicator. I know there is a simple answer but I am
on the lowest step of the learning curve.

Any and all, thanks for your help.
James




--- Graham <kavemanperth@gmail.com> wrote:

> we would need to see the whole formula to know where
> you are getting the
> problems
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> On 02/09/06, James <jamesmemphis@yahoo.com> wrote:
> >
> > Graham,
> >
> > I'm sure #include would work, but I am having a
> > problem just including the indicator into my
> system.
> > The system is not recognizing the indicator. I
> have
> > the following formula as a custom indicator and I
> have
> > included the entire indicator formula into a
> system.
> > The last line of the formula for the indicator is:
> >
> > CI = 100 * (ATRSUM/RANGE)/(periods);
> >
> > The problem occurs in the system where:
> >
> > Buy = Cross (High, BuyUpper) AND  CI > 50;
> >
> > If I used ADX or RSI where I use CI in the above
> Buy
> > command, the ADX or RSI would be blue in the
> editor
> > window where AB recognizes it as an indicator. It
> is
> > not understanding CI and I am getting a syntax
> error
> > at CI. I know I am making an elementary mistake,
> but I
> > don't know what it is. Does anyone know what I am
> > doing wrong?
> >
> > Thanks,
> > James
> >
> >
> >
> > --- Graham <kavemanperth@gmail.com> wrote:
> >
> > > You can include the custom indicator in your
> system,
> > > or else use #include
> > > finction to reference that indicator from its
> own
> > > AFL
> > >
> > >
> > > --
> > > Cheers
> > > Graham
> > > AB-Write >< Professional AFL Writing Service
> > > Yes, I write AFL code to your requirements
> > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > >
> > > On 01/09/06, jamesmemphis
> <jamesmemphis@yahoo.com>
> > > wrote:
> > > >
> > > > Hello everyone,
> > > >
> > > > Is there anyway to use a custom indicator you
> have
> > > created in a system
> > > > without having to replicate the indicator in
> the
> > > system. For example,
> > > > you could have a filter in your system like
> RSI <
> > > 50. But it does not
> > > > recognize the custom indicators. Is there a
> way to
> > > do this?
> > > >
> > > > Thank you,
> > > > James
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 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 other support material please check also:
> > > > http://www.amibroker.com/support.html
> > > >
> > > >
> > > > Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/WktRrD/lOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->

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 other support material please check also:
http://www.amibroker.com/support.html


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@yahoogroups.com
    mailto:amibroker-fullfeatu[EMAIL PROTECTED]com

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscri[EMAIL PROTECTED]com

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










How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. __._,_.___

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 other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

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

__,_._,___

Reply via email to