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

[amibroker] Re: New highs/lows indicator?



PureBytes Links

Trading Reference Links



Werner,
thank you for your very helpful answer!
I am now trying to create the indicator like you said.
I have two small additional questions..

In AB help, under AddtoComposite, it says "so it is now allowed to
join scan and indicator into single formula".
I wonder what this could be for?
As I understand it, you must run a scan everytime you want
to "update" this indicator. Or am I wrong?

I am also thinking, what if you have a database from many
different exchanges, and want to calculate new highs/lows
separately on every exchange. For example, if I have data
from the Swedish, Norwegian and Danish stock markets.
Do I then need to have 3 different indicators in my layout
(and running 3 different scans)? I dont want a "composite" 
indicator for new highs/lows on all these exchanges in one
indicator window.

Just some small thoughts.. Hmm, I am really not
fluent in AFL..

/Jens.




> 
> Jens,
> first you must decide what timeframe you want to use. 
> Let's assume you want the number of new lows for a 100-day period.
> 
> Then something like this will work (scan):
> 
> Timeframe = 100; //choose your timeframe
> NewLos = (LLV( Ref(L,-1),  Timeframe ) == Ref(L,-1);
> 
> Filter = NewLos; //now filter for your stocks
> 
> //Now you are creating an artificial ticker symbol:
> 
> AddToComposite(Filter,"~NewLows","X",1|2|4|16);
> 
> ------------------------------------------------------
> After this, you can plot the artificial ticker with
> just like any indicator:
> 
> NewLo = Foreign ("~NewLows","X") ;  // This is your plot
> 
> ----------------------------
> With NEW HIGHS it is bascically the same, just use HHV instead of 
LLV.
> 
> Hope this helps.
> 
> Werner
> 
> > 
> > 
> > I would like to have a simple "new highs/lows indicator".
> > But I dont know how to program it.
> > Just plotting two lines, one for new lows, and one
> > for new highs, as an indicator.
> > 
> > I suspect this must be done through a scan, in some way,
> > I have no idea how to do it.
> > Does anyone use this, and have a suggestion?
> > 
> > Have searched the forum, it seems this subject hasnt been up 
before.
> > I couldnt find it, surprisingly.
> > 
> > Regards,
> > /Jens.





------------------------ 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/