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

[amibroker] Re: Using Index Data to Adjust Position Sizing



PureBytes Links

Trading Reference Links

Mike, thank you for your time. I had just found it and was getting ready to call off the hunt!
Thanks again,
Wood

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> Use Foreign or SetForeign/RestorePriceArrays to access data from a symbol other than the current symbol.
> 
> http://amibroker.com/guide/afl/afl_view.php?name=foreign
> 
> e.g.
> 
> spyMA = MA(Foreign("SPY", "C"), 50);
> Buy = ...
> standardSize = ...
> PositionSize = IIF(spyMA > ..., standardSize, standardSize * 0.5);
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "woodshedder_blogspot" <woodshedder_blogspot@> wrote:
> >
> > I'm sure this has already been covered somewhere, but the search function is awful and I haven't found anything useful. Feel free to point me to another thread or the manual if what I'm asking has been covered ad nauseum.
> > 
> > What I want to do is use index data, say maybe the SPY/SPX, to adjust position sizes on trades of common stock.
> > 
> > In Tradestation, one just uses Data 1 (could be the SPY) and Data 2 (the stock to be traded).
> > 
> > An easy example of what I want to be able to do is this:
> > 1. if the SPY is above the 50 dma
> > 2. and there is an entry signal on a stock
> > 3. use a full position size
> > 4. if the SPY is not above the 50 dma, use 1/2 position size
> > 
> > I'm not asking for any code, just the basic method of using index data to affect trades.
> > 
> > Thanks!
> >
>




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

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