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

Re: [amibroker] Only long or short and no repeated signals



PureBytes Links

Trading Reference Links

Hi Thomas,
 
This seems to work fine - plot code as is, then uncomment "exrem" lines and plot in seperate pane below original - you can see how all redundant signals were removed by exrem.
 
Steve
 

WRSI = RSI( 14);

yestWRSI = Ref( WRSI, -1 );

Buy = Cover = WRSI > 40 AND yestWRSI < 40;

Short = Sell = WRSI < 60 AND yestWRSI > 60;

//Buy = ExRem( Buy, Sell );

//Sell = ExRem( Sell, Buy );

//Short = ExRem( Short, Cover );

//Cover = ExRem( Cover, Short );

// make short/cover negative so not hidden behind buy/sell

Short = IIf( Short, -1, 0 );

Cover = IIf( Cover, -1, 0 );

Plot( Buy, "buy", colorBrightGreen, styleLine );

Plot( Sell, "sell", colorRose, styleLine );

Plot( Short, "short", colorRed, styleLine );

Plot( Cover, "cover", colorGreen, styleLine );

----- Original Message -----
Sent: Monday, January 09, 2006 3:52 PM
Subject: [amibroker] Only long or short and no repeated signals

Hello,

 

i have some troubles to build a system that goes only long or short (not both at the same time) and only

goes long when no long position is opened and only short if no short position is open.

Can someone help ?

I have tried with the exrem but have not got it to work successfully. I want to display the signals graphically.

 

- - - - - - - - - - - - - - - - - - - -

Best regards

 

Thomas

www.tradingbasis.com

support@xxxxxxxxxxxxxxxx

- - - - - - - - - - - - - - - - - - - -

 



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