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

[amibroker] Re: Help with Barcount



PureBytes Links

Trading Reference Links


Found my mistake,

if "SellPrice[ i ] > 1.1 * priceatbuy " does not get met then it 
never sells.

Marty



--- In amibroker@xxxxxxxxxxxxxxx, "prog200" <prog200@xxxx> wrote:
> 
> Found this code in early Emails and tried it out but not getting any
> buy signal at present only old ones and not most of them are not
> showing up. 
> 
> I ran it on BA and the last signal was in 12/2000 but nothing after 
that.
> 
> What gives?
> 
> Buy = Cross( MACD(), Signal() );
> priceatbuy=0;
>  
>  for( i = 0; i < BarCount; i++ )
> {
>       if( priceatbuy == 0 && Buy[ i ] ) 
>       priceatbuy = BuyPrice[ i ];
>       t1 = i;
>  
>      if( priceatbuy > 0 && SellPrice[ i ] > 1.1 * priceatbuy )
>       {
>         Sell[ i ] = 1;
>        SellPrice[ i ] = 1.1 * priceatbuy;
>         priceatbuy = 0;
>      }
>       else
>         Sell[ i ] = 0;
>  }
> 
> Filter = C > 2;
> Buy  = ExRem(Buy,Sell);
> Sell = ExRem(Sell,Buy);
> 
> 
> Thanks 
> Marty





------------------------ 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/