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

[amibroker] Re: How can I create buy/sell signal on two symbols simultaneously?



PureBytes Links

Trading Reference Links

I would like to mention one point which might be essential to find a
solution: The 2nd symbol is always the same independent on the 1st
symbol, means for all signals on the symbols within a list the
contrary signals should be created on a single 2nd symbol, e.g. an
index tracker like SPY.

--- In amibroker@xxxxxxxxxxxxxxx, "markhoff" <markhoff@xxx> wrote:
>
> Hi folks,
> 
> I'm struggeling with one idea which I would like to implement in AFL,
> but I have no clue if it is possible.
> The basic concept is to generate a buy/sell signal on two symbols at
> the same time, based on the trigger from the actual (1st) symbol which
> is evaluated by AA backtester (e.g. when processing a watchlist).
> Stepwise Example:
> 
> --- cut ---
> 
> buy = <my formula to create the buy signal for the current symbol>
> sell = <my formula to create the sell signal for the current symbol>
> 
> positionsize = <my formula to calculate possize of the current symbol>
> 
> // now my problem (algorithm description)
> 
> if(buy == true)
> {
>   sell_2nd_symbol = true;
>   positionsize_2nd_symbol = positionsize;
> }
> if(sell == true)
> {
>   buy_2nd_symbol = true;
>   positionsize_2ns_symbol = positionsize;
> }
> 
> --- cut ---
> 
> So I have to transfer both buy/sell signal and positionsize for each
> trade of the 1st (actual) symbol to a 2nd symbol to create the
> appropriate signals also here, and the trade for both symbols should
> be done on the same DAY (no bar number, which might be different if
> the size of my array for 1st symbol is different from 2nd symbol).
> 
> I could not find any way to do it with the custom backtester, now I'm
> not sure if I missed the right way or if I ran into a limitation of AB.
> 
> Does anybody have a hint how to solve above problem?
> 
> Thanks in advance and best regards,
> Markus
>



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

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/