PureBytes Links
Trading Reference Links
|
You have a absic problem with the system logic in that you cannot
define a signal before it has occured. You are in effect trading into
the future. But with a small change it may (or not) work. Cannot
promise that :(
p4=10;
buysig = Cross(Cci(p4),-100);
Sellsig=Cross(100,Cci(p4));
bs=BarsSince(Buysig OR Sellsig);
pp=Max(bs,p4);
CC=CCI(pp); //variable for period not allowed
Buy=Cover=Cross(Cc,-100);
Sell=Short=Cross(100,Cc);
I just quickly checked the syntax in AB and I don't think CCI allows
the periods to be variable. it must be a set value.
Therefor you would probably need to work this into a loop to get to
owrk, sorry I don't have time at present to do any more on this.
On Sun, 20 Feb 2005 10:18:54 -0000, Hans <hansib@xxxxxxxxx> wrote:
>
>
> Please help,
>
> Thanks
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Hans" <hansib@xxxx> wrote:
> >
> > Hello,
> >
> > I need some help.
> >
> > My goal is to have a CCI with variable period so that bars since buy
> > or sell that exceeds 10 are the new CCI period.
> >
> > I have coded this:
> >
> > p4=10;
> >
> > bs=BarsSince(Buy OR Sell);
> > pp=Max(bs,p4);
> > CC=CCI(pp);
> >
> > Buy=Cover=Cross(Cc,-100);
> > Sell=Short=Cross(100,Cc);
> >
> > **********
> > problems are initialization of arrays.
> > how can i consider buy/sell before calculation, and at the same time
> > to make calculations i need buy/sell.
> >
> > Thanks for any help.
> >
> > Hans
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
--
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|