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

[amibroker] Re: Single Signal for Two Symbols



PureBytes Links

Trading Reference Links

Hello spi_maker,


Re buying either symbol if index moves:

- AB default is the current symbol, so ,make your index the current symbol
- use Foreign() etc to reference non-current symbols

refer to the functions in the AB Help manual under the category "Referencing other symbol data",

FOREIGN - access foreign security data (AFL 1.5) 
GETBASEINDEX - retrieves symbol of relative strength base index (AFL 2.1) 
PLOTFOREIGN - plot foreign security data (AFL 2.2) 
RELSTRENGTH - comparative relative strength (AFL 1.3) 
RestorePriceArrays - restore price arrays to original symbol (AFL 2.5) 
SetForeign - replace current price arrays with those of foreign security (AFL 2.5)


To test for significance:

it depends on your definition of significance and how you define the becnhmark (ave or normal behaviour)

- for benchmarking I have used volality measures and taken a moving average OR range e.g. upper quartile OR StDev (the hard part is to decide what is an acceptable period)  ... you will see that 'outliers' change the MA markedly when they come into and leave the referenced range ... from memory I think each method has its weaknesses based on the approximations it makes e.g. frequency distribution probably isn't normal so StDev is an approx use OR the MA can be 'skewed' by small number of relatively large returns so that > MA != 50% of cases etc

- for the measurement I have used ROC(array,period) to measure a single point ... very quick and easy to use OR ATR(1) ... read carefully what AB's default is for this when using it with periods OR other measures of volatility e.g. StDev 

example:

ROC(C,1) > MA(ROC(C,1),50);//returns 1 if TRUE

So if the above is true for the index == a significant day then buy your foreign(symbol).

Try something along those lines to get started - if you get stuck or don't like that approach try the forum again with a more specific question.

--- In amibroker@xxxxxxxxxxxxxxx, "spi_maker" <jarea@xxx> wrote:
>
> I have been experimenting with AB for the past several weeks and it is a very impressive system.  There is one thing I would like to try and do and I am not sure whether I can get there with Amibroker.
> 
> My trading calculation watches the performance of a specific index and if it moves in one direction at a certain level of significance, I want to execute a buy of Symbol-1, but when I register a significant move in the other direction, I want to execute a buy of Symbol-2.
> 
> Any pointers on how to accomplish this with Amibroker would be greatly appreciated.
>




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

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