Hi,
--
I am new to Amibroker. this is a basic question for which I have struggled for 2 full days...
I have written an AFL with following code for position sizing & SL
RiskPerShare = 10 * ATR( 21 ); //For this AFL increased risk as market may show volatilityApplyStop( stopTypeLoss, stopModePoint, RiskPerShare, True );PositionRisk = 3; // risk 3% of entire equity on single tradePctSize = PositionRisk * BuyPrice / RiskPerShare; // position size calculationSetPositionSize( PctSize, spsPercentOfEquity );
When I backtest my AFL, following issues are coming -
- max position it takes is 100 shares for every script even if I have high equity...
- When for a day one position is open (any script) second script while capculating position size, it considers risk on first position also. What I need is amibroker to consider every 2 positions different and give risk to each one of them individually.
Thanks in advance
__._,_.___
Posted by: "Milind Pol." <milind.pol@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Save time and get your email on the go with the Yahoo Mail App
Get the beautifully designed, lighting fast, and easy-to-use, Yahoo Mail app today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
**** 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/
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/
.
__,_._,___
EmoticonEmoticon