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

[amibroker] Re: How to tag losers/winners, anyone?



PureBytes Links

Trading Reference Links


thanks a million!

--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen" 
<psytek@xxxx> wrote:
> 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@x...]
>   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 --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/