PureBytes Links
Trading Reference Links
|
Graham, I run explorations only. I understand that when you are running an
exploration, Amibroker checks back to the very beginning of your database
when looking for buy signals. This is fine for visually checking for buy
setups.
However, when I run an exploration to look for a setup that finally
materialized, I would like to limit the lookback to a little over 100
days, because that is how far I look back with my AFL coding.
Below, I have pasted the afl coding for a particular setup, and then below
the dotted line, I INSERTED my buy criteria.
aRio4103=pu==mx AND pu>pk AND pk>tq AND rddip AND rdxbk AND
Sum(rdwhsqz995+bugnsqz995,10)>=5 AND Sum(yltqsqz999,15)>=10;
PlotShapes(IIf(aRio4103,shapeDigit1+shapePositionAbove,shapeNone),colorGreen);
-------------------------------------------------------------------------------------------------------------------------------------------------
I have never used datenum() before.
Here is an idea to limit the lookback period in my buy setup explorations.
At the beginning of each new month, I would have set the dn to the 25th day
of 4th month in the past in order to make sure that my lookback period is
over 100 days.
At the beginning of June, I would have set the dn to the 25th day of
Feburary. Therefore, I came up with a datenum() of 108225.
I would appreciate hearing some comments about this approach to limit the
number of lookback days in my BUY EXPLORATIONS.
I don't know what the >,O,null) means as well as the>, "O" );
Ron D
PlotShapes(iif(aRio4103 AND datenum()>=108225,O,null), "aRio4103",
"O" );
----- Original Message -----
From: "Graham" <kavemanperth@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, June 16, 2008 10:18 PM
Subject: Re: [amibroker] AddToComposite - Limit Timeframe in SCAN - Bug??
> Running addtocomposite from a scan will always include all bars in the
> history.
> What you can do is limit the arrays to only what you want
> eg
>
> dn = datenum()
> AddToComposite(iif(dn>=1040101,O,null), "~Russell3000", "O" );
>
> then run the scan for n=1 last quotation only
>
> --
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
>
>
> 2008/6/17 patsgreatdeals <patsgreatdeals@xxxxxxxxx>:
>> I am doing some work to create a composite based on stocks in the
>> Russell 3000. In the SCAN I select a date range from 2004 to current.
>>
>> Everytime I run it, the scan goes back to 2000. I do not want the
>> composite to go back that far. Is there a bug that is cause this to go
>> back so far even though I set the RANGE on the scan for a specfic
>> FROM/TO?
>>
>> AddToComposite(O, "~Russell3000", "O" );
>> AddToComposite(H, "~Russell3000", "H" );
>> AddToComposite(L, "~Russell3000", "L");
>> AddToComposite(C, "~Russell3000", "C" );
>> AddToComposite(V, "~Russell3000", "V" );
>>
>> /* add one to open intest field (we use this field as a counter) */
>> AddToComposite( 1, "~Russell3000", "I" );
>>
>>
>> ------------------------------------
>
> ------------------------------------
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|