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

[amibroker] Simple Exploration Question



PureBytes Links

Trading Reference Links

Hi,
Hope someone can help with this simple problem.
I have a system which generates Buy and Sell signals, and have used 
Exrem to remove excess signals. I now want to run an exploration over 
all symbols in my database to select all those for which the last 
signal was a Buy. I realise I could use Explore over the last n days 
(n=50 say)to pick up buy signals but would prefer to run over all 
quotations and pick up the last Buy, regardless of how long ago that 
was.
I tried adding:-
bought = flip(buy, sell); which sets bought to 1 after the last buy if 
there is no subsequent sell.
Also used Addcolumn to display bought.
 However, testing on a single stock with various attempts to filter on 
the LastValue of bought didn't work, as the Explore output gave every 
value in the chosen stock. My attempts to use ValueWhen(bi = Barcount)
fared no better.
The problem (to me at least) seems to be that when you would like to 
set a single variable to a value, AFL makes it a complete array. The 
reason for this long-winded question is that I think this problem of 
getting single values rather than arrays arises all the time - so a 
general explanation of ways around it would be most helpful.
Thanks in anticipation

Brian W



------------------------------------

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/