| 
 PureBytes Links 
Trading Reference Links 
 | 
 This 
is how I would do it: 
 Buy = 
Ref(CCI(20),-1) < 0 // Previous 
Bar CCI Was Less Than 0 
          
AND CCI(20) > 0 // Current Bar CCI(20) is Greater Than 0, 0 
Crossover 
          
AND Ref( C , -1) < EMA( C , 30) // Previous Bar 
Close is Below 30 Period Exponential Moving Average 
          AND 
C > EMA( C , 30) ; // Current Bar Close Is Above 30 Period 
Exponential Moving Average 
 Sell = Ref(CCI(20),-1) > 0 // 
Previous Bar CCI Was Greater Than 0 
        
AND CCI(20) < 0 // Current Bar CCI(20) is Less Than 0, 0 
Crossover 
        
AND Ref( C , -1) > EMA( C , 30) // Previous Bar 
Close is Above 30 Period Exponential Moving Average 
        
AND C < EMA( C , 30) ; // Current Bar Close Is Below 
30 Period Exponential Moving Average 
  
I back tested back to 2000 by running the Automatic 
Analysis with this Buy/Sell combo applied to IWM as my "Current 
Symbol". 
I use 
daily bars and base my formulas on the Close price. 
It only turned up 14 trades in that 
period. 
This Chart shows the Buy/Sell 
Signals. 
  
  
This took me about 10 minutes. 
Scott 
  I guess I didn't clarify my buy/sell trigger 
  points in my original  message.  I apologize for my shortcut. Of 
  course, what you've said  in your message is EXACTLY what I meant and would 
  employ.  That  said, for the benefit of someone who has never coded in 
  Amibroker  language, but would just like to see how it would look, could 
  you  show me the scripting (or whatever?) of how I would accomplish 
   buying and selling the Russell 2000 (IWM as its ETF), with these 
   parameters:
  Buy -- when IWM's price goes up through its 30-day 
  weighted MA and,  simultaneously, when IWM's price goes upward through its 
  20-day CCI  (crossing the 0 line upward).  Both conditions must be met 
  before a  buy is implemented.
  Sell -- Vice versa.
  Thanks in 
  advance to anyone who can show me.  I am considering  buying 
  Amibroker, but I just want to see what I'm getting myself  into with regard 
  to programming.
  GL Gene   
 
  --- In 
  amibroker@xxxxxxxxxxxxxxx, "jnk1997" <jnk1997@xxxx> wrote: > First 
  of all you don't have a buy "trigger", being above the 30  day  > and 
  positive CCI will result in continuous buy signals (or sell  > signals 
  if below). You want to initiate a buy if the price  yesterday  > was 
  below the 30 day and today it crossed above, right? >  > This will 
  most certainly help you: >  >  > http://www.amitools.com/ >  > 
   >  >  >  >  >  >  >  > --- In 
  amibroker@xxxxxxxxxxxxxxx, "glgene" <glgene@xxxx> wrote: > > I 
  am considering purchasing Amibroker software, but I'm  concerned  > 
  about  > > the scripting involved.  I haven't programmed in 30 
  years!   Could  > > someone show me, for example, how to set 
  up a buy/sell signal on  > the  > > Russell 2000, using IWM as 
  the stock (it's an ETF).  Here are  the  > rules  > > I 
  have in mind. > >  > > If the IWM stock price is > that 
  its 30-day weighted MA, > > and > > If the IWM CCI (20-day) 
  is positive ..... Buy > >  > > Vice versa for a 
  Sell. > >  > > How would you script that?  How would I 
  backtest that to see how  > many  > > buy/sell signals would be 
  invoked, drawdown, etc.? > >  > > Thanks. > > 
   > > GL Gene
 
 
 
  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
 
 
  
  
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 
  |