Allan This may be elementary to you but this is how I find out how these functions work. (or I plot the signals out or use TRACE). I don't doubt they work but it helps with my understanding
CROSS will give you an impulse, that is - a one(1) at the time of crossing. So to show what EXREM does I used moving average cross oversm which will give you 1's for the number of bars the conditions are met. Your criteria of 200 day MA just didn't give me that many hits so I changed it to fifty to demonstrate. Maybe it was the ticker I was using INTC. Try this out on your ticker and see if this helps, that is set range to 252 bars, single issue in the filter area, and do an EXPLORE. Best regards Joe BuyTemp= Close> MA(Close,21); SellTemp=MA(Close,50)>Close; Buy = BuyTemp; Sell = SellTemp; Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Filter = 1; AddColumn(BuyTemp,"All Buy Signals"); AddColumn(Buy,"BUY SIGNAL"); AddColumn(SellTemp,"All Sell Signals"); AddColumn(Sell,"SELL SIGNAL"); ----- Original Message ----- From: "matrix10014" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, July 31, 2006 7:40 AM Subject: [amibroker] Exrem help > Hi all, > > Whenever I get to the point of thinking I understand Exrem(),the > backtest results prove me wrong....I think it has something to do > with my interpertation of this definition from the manual > > "removes excessive signals: > returns 1 on the first occurence of "true" signal in Array1 > then returns 0 until Array2 is true even if there are "true" signals > in Array1 " > > > here is my test code. > > Buy=Cross(Close,MA(Close,21)); > Sell=Cross(MA(Close,200),Close); > Buy=ExRem(Buy,Sell); > Sell=ExRem(Sell,Buy); > PositionSize=-10; > //PositionScore=100-RSI(); > ApplyStop(0,1,Optimize("maxstop",1,2,26,2),2,False,1); > > > > > It is clear from my backtests,that AMI ignores the first buy signal > until the Sell criteria is met.As array1 is my Buy MA cross,I would > have expected to be long on the very first MA cross(array1 =1) and > then it would be reset to zero and no buy signals could be taken > until array2=1(close crosses below Ma).By the user manuals > definition,I should be long on the first occurence,and it is not > happening.I thought that should I be stopped out to due a max loss > stop,all Buy signals would be ignored until my "SELL" criteria is > met... > > > Would someone simply explain what Exrem() does,and what the logic > is?? Why is it ignoring the first buy signals until the Sell > criteria is met??As far as I can tell,the definiton should be... > > "returns 0 on the first occurence of "true" signal in Array1 > until Array2 is true even if there are "true" signals in Array1 " > > Can someone plaease lead me from the path of darkness??? > > > Just checking...In AA under the range options,am I correct that for > the selection of N last days,DAYS is calender days and not trading > days.So N=252 is NOT 1 year of data.This seems to be my finding when > i select the range option and use a 1 year range to verify... > > How do I simply click on a trade in AA and have a chart pop up?? > > Any and all help welcome > > Allan > > > > > > > > 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 > > > > > > > > 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: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
