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

[amibroker] Help with Barcount



PureBytes Links

Trading Reference Links


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 --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/