PureBytes Links
Trading Reference Links
|
You can calculate trade profits with:
e = equity(1);
LongProfit = e - valuewhen(Buy, e); // Remember to consider trade delays...
if this is positive you have a winning trade, you can count winning trades
with
WinningTrades = Cum( (LongProfit > 0) and Buy ); // AND with Buy to get a
single bar boolean
You can count winning trades per n-days with something like this
WinPerWeek = sum( (LongProfit > 0, n ) and Buy );
The above code is not tested but will hopefully get you started,
best regards,
herman.
-----Original Message-----
From: quexos0 [mailto:quexos0@xxxxxxxxxxxx]
Sent: Thursday, October 21, 2004 3:42 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] How to tag losers/winners, anyone?
So, is there an amibroker code to tag losers/winners?
Or do I have to go one big round by examining whether the last
sell/cover price was higher/lower than the corresponding buy/sell
price?
--- In amibroker@xxxxxxxxxxxxxxx, "quexos0" <quexos0@xxxx> wrote:
>
> How do I code this?
>
> Say I have a system that generates 5-10 whipsaw losers within 40%
of
> the weeks I backtested on.
> I want to limit my losses during those weeks, thus I want the
system
> to stop taking any further signals after x losers occurred within
> the week.
>
> The maintain query is:
>
> How do I tag a trade as winner/loser? Does amibroker auto-analysis
> have the ability to recognise previous trades as losers so I can
> code something like "if 3 losers occur in this week, stop trading".
>
> Thanks a lot, this list have been of great help to me learning
> amibroker.
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|