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

Re: [amibroker] Trend by MACD



PureBytes Links

Trading Reference Links

Hello pmaljers,

/* If the MACD of the current bar is greater than the MACD of the previous bar then Buy.*/
Buy = MACD() > Ref( MACD(), -1 );

/* If buy equals false then sell. */
Sell = IIf( Buy == False, True, False );

/* ExRem function removes excessive signals */
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );


Regards,
William Peters
www.amitools.com


Saturday, September 11, 2004, 9:09:25 AM, you wrote:

p> Hi,

p> I am looking for a formula to do the following:

IF MACD()[today] >> MACD()[Yesterday] then
p> buy = 1;
p> else
p> sell = 1;

p> Bye
p> Peter




 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/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/