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

[amibroker] Re: Contracts and position value



PureBytes Links

Trading Reference Links

Hi Graham

Initial capital is 10000. Im running in futures mode.

tks

--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> What is your initial capital size, maybe you are using this up in 
the first
> trade.
> 
>  
> 
> Cheers,
> Graham
> 
>  <http://groups.msn.com/ASXShareTrading>
> http://groups.msn.com/ASXShareTrading
> 
>  <http://groups.msn.com/FMSAustralia> 
http://groups.msn.com/FMSAustralia
> 
> -----Original Message-----
> From: Andrew Smith [mailto:andy_kovacs@x...] 
> Sent: Tuesday, 20 May 2003 8:32 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Contracts and position value
> 
>  
> 
> Hi - I was wondering if anyone could explain this to me:
> 
>  
> 
> Im using the following code
> 
>  
> 
> stop=IIf(Buy,stoplong,IIf(Short,stopshort,0)); // stoplong and 
stopshort are
> values calculated by a trailing stop jscrip I found on the site
> 
> PointValue = 1;
> 
> RoundLotSize=1;
> 
> risk=100; //fixed value in $ per position
> 
> NumContracts = IIf(risk/stop>1,round(risk/stop),0);
> 
> MarginDeposit=1;
> 
> PositionSize = NumContracts * MarginDeposit;
> 
> Now, my problem is the following. When I run an explore, 
numcontracts works
> fine and I get the numbers Im expecting. However, when I backtest, 
I get
> exponential results. Fr the first position of any instrument I get 
1e006,
> the rest are zero. Position value comes out at 0.
> 
> How are contracts and position value calculated? If I know this I 
can amend
> my code ...
> 
> Thanks
> 
> Andy
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> 
> ADVERTISEMENT
>  
> 
<http://rd.yahoo.com/M=244522.3313099.4604523.1261774/D=egroupweb/S=1
7056321
> 98:HM/A=1588187/R=0/*http:/ashnin.com/clk/muryutaitakenattogyo?YH=%
25LINEID%
> 25&yhad=1588187> Click Here!
> 
> 
>  
> <http://us.adserver.yahoo.com/l?
M=244522.3313099.4604523.1261774/D=egroupmai
> l/S=:HM/A=1588187/rand=222150081> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/