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

Re: [amibroker] Re: Scan help



PureBytes Links

Trading Reference Links

It may be just possible that you never get a bar where all conditions are true
Try running filter to check when conditions are true
Filter=1;
AddColumn(Cond1,"C1",1);
AddColumn(Cond2,"C2",1);
AddColumn(Cond3,"C3",1);
AddColumn(Cond4,"C4",1);
AddColumn(Close > 10 ,"C1",1);
AddColumn(V >= 1000000 ,"C1",1);
AddColumn(EMA (V, 30) >= 500000,"C1",1) ;
AddColumn(ATR(15) >= 1.2 ,"C1",1);
AddColumn(Cond1 AND Cond3,"C1",1);
AddColumn(Cond2 AND Cond4,"C1",1);

On 7/12/05, Qitrader <yiupang91@xxxxxxxxx> wrote:
> Hi all,
> 
> After a few tries, I came up with the following code but I'm not sure
> if this is correct as I'm not getting the setups I would like to see
> under exploration.
> 
> //
> Cond1 = LinearReg(Close,3) > Ref(LinearReg(Close,3),-1) AND
> LinRegSlope(Close,23) >= 0;
> 
> Cond2 = LinearReg(Close,3) < Ref(LinearReg(Close,3),-1) AND
> LinRegSlope(Close,23) <= 0;
> 
> UpperBand = LinearReg (Close,3) + .9 * StDev (Close, 23) ;
> 
> LowerBand = LinearReg (Close,3) - .9 * StDev (Close, 23) ;
> 
> Cond3 = Close < LowerBand ; //closing price at bottom of channel
> 
> Cond4 = Close > UpperBand ; //closing price at top of channel
> 
> Filter = Close > 10 AND V >= 1000000 AND EMA (V, 30) >= 500000 AND ATR
> (15) >= 1.2 AND ((Cond1 AND Cond3) OR (Cond2 AND Cond4));
> 
> ATR15 = ATR (15);
> EMA30 = EMA (V, 30);
> AddColumn (C, "Close");
> AddColumn (V, "Volume");
> AddColumn (ATR15, "Average True Range");
> AddColumn (EMA30, "30 Day Average Volume");
> 
> //
> 
> tony
> qitrader
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Qitrader" <yiupang91@xxxx> wrote:
> > Hi all,
> > This is the code based on the scan I'm currently working on.  I still
> > have alot of bugs to resolve but I would appreciate if any of you can
> > provide me with some help as well as feedback. Some of the study and
> > function come from this link below:
> >
> > http://amibroker.com/library/detail.php?id=438
> >
> > //Linear Regression Scan
> > Buy = IIf (Cross(LinearReg(Close,3), EMA(Close,3)) AND Close < .85*SDL
> > AND LinRegSlope (Close, 23) > 0;
> >
> > //Based on Day, Signal to go LONG if LinearReg crosses over EMA and
> > price is below -.85 standard deviation (23 period)
> > //and slope of channel > 0 and 15 period Average True range > $1 and
> > Volume > 500,000
> >
> > Sell = IIf (Cross (EMA(Close,3), LinearReg(Close,3)) AND Close >
> > .85*SDU AND LinRegSlope (Close, 23) < 0);
> >
> > //Based on Day, Signal to go SHORT if EMA crosses over LinearReg and
> > price is at the bottom of 23 period Linear regression channel
> > //and slope of channel > 0
> >
> > Filter = Close > 10 AND Close < 100 AND V > 1000000 AND EMA (V, 30) >
> > 500000 AND ATR (15) > 1.2 AND Buy;
> > Filter = Close > 10 AND Close < 100 AND V > 1000000 AND EMA (V, 30) >
> > 500000 AND ATR (15) > 1.2 AND Sell;
> >
> > //Scans for stocks ranging from $10-$100 with volume > 1M, 30 day
> > average exponential volume > .5M and Average true range greater than
> > $1.2
> >
> > ATR15 = ATR (15);
> > EMA30 = EMA (V, 30);
> > AddColumn (C, "Close");
> > AddColumn (Buy, "Buy",colorGreen);
> > AddColumn (Sell, "Sell",colorRed);
> > AddColumn (V, "Volume");
> > AddColumn (ATR15, "Average True Range");
> > AddColumn (EMA30, "30 Day Average Volume");
> >
> > //
> >
> > thanks
> >
> > tony
> > qitrader
> 
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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/