PureBytes Links
Trading Reference Links
|
I'm using the following to screen for shares that have risen by a
given percentage over x period of time, as defined in the "From ...
to section". I will be using this over different time periods.
If I delete the if , else statement I get a trigger each time the
share creates a new ema high that fits into the filter, If I leave
the If, else statement I get nuthin...
Still coming to terms with the logic..:( Could someone please point
out the correct way I should be coding this section if I only want
to get one trigger per share. Once the share has been triggered
within the time frame , I don't want it to be retriggered again.
/**/
x=90;// this defines the period over which I'm averaging the price
and volume to define turnover
turnover = MA(V,x)*MA(C,x);// this defines turnover
F1= Turnover > 20000; //this fiters shares with turnover of > $20,000
F2 = HHVBars( C, x ) < 30 ;/* this displays the shares that have had
their highest peak in the last x days in the last 30 day */
F3 = EMA(C,20)>Ref(EMA(C,20),-x)*1.3;
for( i=1;i<BarCount;i++)
{
if ( F3[i] AND F3[i-1]==0 )
{
F3[i];
}
else
{
F3[i] = F3[i-1];
}
}
Filter = F1 AND F2 AND F3;
perinc=100* (HHV(C,x)-LLV(C,x))/LLV(C,x);
AddColumn(Turnover,"turnover",1.0);
AddColumn(LLV(C,x), "Lowest");
AddColumn(ValueWhen(C==LLV(C,x),DateTime()),"Lowest
Date",formatDateTime);
AddColumn(HHV(C,x),"Highest");
AddColumn(ValueWhen(C==HHV(C,x),DateTime()),"Highest
Date",formatDateTime);
AddColumn(C,"Close");
AddColumn(perinc,"% Increase");
See Change
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|