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

Re: [amibroker] Barsince for last buy arrow



PureBytes Links

Trading Reference Links

You could try Equity(1) but I am not sure what it actually does

or try this


Buy = cross( CCI(9) , 0 );

paidt = BarsSince( Buy == 1 );

printf("barssince = %g\n", BarsSince( Buy == 1 ));

Sell = cross( paidt , 14 );

Buy  = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);


On Sun, 30 Jan 2005 00:02:12 -0000, prog200 <prog200@xxxxxxxxx> wrote:
> 
> 
> I'm having trouble keeping the value of  bars since of the last green
> arrow occured. When I use the code below it gives me the barsince,
> but will start to recount when CCI(9) becomes a buy again. Is there a
> way to find the barsince of the Green Arrow?
> 
> I'm trying to sell at certain times in the future and do not want to
> use the  N-Bar stop in the Back Tester.
> 
> Buy =  CCI(9) > 0;
> 
> paidt = BarsSince( Buy == 1 );
> 
> printf("barssince = %g\n", BarsSince( Buy1 == 1 ));
> 
> Sell = paidt > 14;
> 
> Buy  = ExRem(Buy,Sell);
> Sell = ExRem(Sell,Buy);
> 
> Thanks
> 
> Marty
> 
> 
> 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/