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

[amibroker] Re: Sell code to exit after 30 bars



PureBytes Links

Trading Reference Links

Hello,

Not sure I can help, barssince should work (barssince(buy)==30), make 
sure you are deleting any unwanted buy singals using exrem, try the 
following.. hope it helps.

Cya,
Steve.

/* your code */
.
.
.
/*** add ***/
buy=exrem(buy,sell);
sell=exrem(sell,buy);
sell = sell or barssince(buy)==30;
buy=exrem(buy,sell);
sell = exrem(sell,buy);
/** end **/
--- In amibroker@xxxxxxxxxxxxxxx, "sgearhart12000" <sgearhart1@xxxx> 
wrote:
> Does anyone have the logic to exit a trade after 30 bars has passed.
> I've tried the barssince code but I can't seem to get to work.
> Thanks
> Scott Gearhart




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/