PureBytes Links
Trading Reference Links
|
BTW, you can remove the qty. I additionally had
also
taken the costs (ie. commission etc.) into the
calculation,
and then you would need the qty...
UM
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=uenal.mutlu@xxxxxxxxxxx
href="">uenal.mutlu@xxxxxxxxxxx
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Wednesday, April 30, 2003 9:56
PM
Subject: Re: [amibroker] how is the
profit for shorts calculated?
Hi Peter,
use the same formula as that for long but
then
multiply the result by -1 if it was as short
trade.
Here is an excerpt from my C++ code. flPrice is the
initial price.
float flProfitPerc = (flPriceNext * flQty)
/ (flPrice * flQty) * 100.0f - 100.0f; if (iTradeType ==
0) // 0="short", else "long"
flProfitPerc *= -1.0f;
UM
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
peter
j
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Wednesday, April 30, 2003 9:41
PM
Subject: [amibroker] how is the profit
for shorts calculated?
This is about my tenth attempt to post this, i hope the other
posts dont appear.
Hi members.
I have a question about short trades.
Is the profit basically worked out similar to a long
profit.
e.g. the buy to sell value
In a short trade could the profit be worked out in reverse (
not in reference to ami, will be used for a spread sheet)
e.g. If the short was $10.00 and the cover was
$5, could i reverse these and say that there was a %100
profit.
or are there oddities when working out the profit of a
short trade.
Peter.
Yahoo! Groups Sponsor
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 the Yahoo! Terms of Service.
|