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

[amibroker] Re: PositionSize based on Equity and Trade Risk



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "dbwyatt_1999" <dbw451@xxx> wrote:
>
> I know setting PositionSize based on Equity and Trade Risk has been the topic of numerous threads and writeups, but I'm missing some understanding.  I'm backtesting a portfolio of futures contracts and would like to set the Position size of each trade based on each trade's risk (i.e. abs(entryPrice - stopPrice)) and a percent of the current portfolio Equity value.  I understand that to get the current portfolio Equity, I need to use the custom backtester.  The custom backtester also gives me access to all the data I need to calculate a new PosSize except my stopPrice values.
> 
> What is the easiest way to access my backtester Phase 1 stopPrice array in the custom Phase 2 backtester for each trade so that I can calculate a new PosSize?  Using AddToComposite() and Foreign() does not seem like an option because I want my individual stop values for each instrument, not a portfolio composite of all stop values.  Or maybe I would have to create a separate composite for each instrument.  Or do I have to resort to something like writing and reading files or developing a custom DLL to store the stopPrices between the backtester Phase 1 and the custom backtester Phase 2?  Hopefully, I'm just not understanding something and there is an easier way.  I would think that accessing Phase 1 backtester variables in Phase 2 would be pretty common; especially for calculating custom metrics.
> 
> Thanks for any suggestions or insights.
> 
> Regards,
> 
> David
>dear sir
i have seen some technical chart of indian nifty in www.vfmdirect.com web site. he has mentioned that chart is from ambibroker .com. i am doing intra day trading in indian NSE & india shares. kindly whether you will provide india share technical& what is your condition etc.
regards balachandra.




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

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