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

[amibroker] Re: Resetting a Composite



PureBytes Links

Trading Reference Links

Herman,
The question is strange, the answer is rather simple:
When you hit scan in an AddToComposite(x,"~ticker","V") formula, 
amibroker resets the ~ticker value and then adds x values one by one, 
according to their z=Status("Stocknum").
If you reset in the middle of the scan, say right after the 10th 
stock, then the first 11 tickers will not contribute to the addition.
It is described with

z=Status("stocknum");
AddToComposite(IIf(z>=11,StochD(),0),"~sumStochD","V");
Buy=0;

The formula will calculate the sum of StochD for z>=11, which is 
equivalent to reset right after z==10.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx> 
wrote:
> Hello,
> 
> is it possible to reset a composite to zero in the middle of a Scan 
or
> Exploration?
> 
> thanks,
> herman


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/