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

[amibroker] Re: multiple signals on before trading?



PureBytes Links

Trading Reference Links

Are you using live data or static data? 

If you are using a live data feed intraday and you want to count the 
number of times you get a signal you will probably have to store the 
count in static variables. The reason is that the signals may occur 
many times in a bar and disappear before the bar closes. From AFLs 
point of view those signals never happened. But an auto trading program 
will see them and act on them. 

The reason they appear and disappear is that AB scans through your 
indicators every time a tick comes in. If the condition is true on one 
scan it may not be true on the next scan. The condition may be true for 
many ticks and reverse if the condition no longer exists by the end of 
the bar. 

As a side point, this is one reason it is almost impossible to back 
test live trading programs and get reliable results.

If you are using static or live data one way to accomplish this is to 
give each signal a weighing factor and buy if the sum exceeds a 
threshold. The problem with a weighting factor with live data is that 
you may get many more signals than you expect which would throw the 
count off.

With static only data you can test n bars for a condition and set the 
signal true if it occurs over that period. Then sum all true conditions 
and buy if that is over a threshold.

Barry

--- In amibroker@xxxxxxxxxxxxxxx, "shaunpms" <shaunpms@xxx> wrote:
>
> Hello all - Is there an easy way to code the trading algorithm such 
> that some number of multiple signals must cross a threshold before 
the 
> real Buy signal is evoked?  E.g. suppose you have 8 signals, and when 
> any 5 of the 8 signals are True - you do the actual Buy.  Its almost 
> like I'm looking for the sum of each signal to be compared to a 
> threshold before Buying.  I thought I could do this by going thru 
each 
> bar and creating a side stepped array which is the aggregate of all 
> other signals, but wondered if someone had a shorter way to do this.
> 
> thanks in advance,
> shaun
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/