PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Calculate the profits from Equity(0).... here is a
start:
//
$ProfitbarsBuy<FONT face="Lucida Console"
size=2>1=Ref<FONT
size=2>(Buy,-1); //
I assume a reversal systemSell<FONT face="Lucida Console"
size=2>1=Ref<FONT
size=2>(Short,-1<FONT
size=2>);Short1<FONT
size=2>=Sell1<FONT
size=2>;Cover1<FONT
size=2>=Buy1<FONT
size=2>;LongProfit = IIf<FONT
size=2>(Sell1,E -
ValueWhen(Buy<FONT
face="Lucida Console" size=2>1,E),<FONT color=#ff00ff
size=2>0);ShortProfit = <FONT color=#0000ff
size=2>IIf(Cover<FONT face="Lucida Console"
size=2>1,<FONT color=#0000ff
size=2>ValueWhen(Short<FONT face="Lucida Console"
size=2>1,E)-E,<FONT color=#ff00ff
size=2>0);<FONT color=#0000ff
size=2>Plot(<FONT color=#0000ff
size=2>IIf(Sell<FONT face="Lucida Console"
size=2>1,LongProfit,<FONT color=#ff00ff
size=2>0),<FONT color=#ff00ff
size=2>"LProfit",<FONT color=#ff00ff
size=2>5,2<FONT
size=2>+4<FONT
size=2>);Plot<FONT
size=2>(IIf<FONT
size=2>(Cover1<FONT
size=2>,-ShortProfit,0<FONT
size=2>),"SProfit"<FONT
size=2>,4,<FONT
color=#ff00ff size=2>2+<FONT color=#ff00ff
size=2>4);<FONT color=#0000ff
size=2>Plot(0<FONT
size=2>,"",<FONT
color=#ff00ff size=2>1,<FONT color=#ff00ff
size=2>1);
<FONT face=Arial
color=#0000ff>happy trading,
<FONT face=Arial
color=#0000ff>herman
<FONT face=Tahoma
size=2>-----Original Message-----From: Collectable Images
[mailto:telecard@xxxxxxxxxxxxxx]Sent: Friday, July 09, 2004 3:46
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] sar
CONDITIONAL Looping??I want to try a simple system as
follows.Long entries, take only if last long entry was a win or if
it would havebeen a win had it not been stopped out.Short Entries,
take only if last short entry was a win or if it would havebeen a win had
it not been stopped out.So long and short entries depend on
whether the last entry in that samedirection was a win or a loss. If the
last entry was a loss (or would havebeen a loss) this entry is ignored. If
this ignored entry would have beenawin though, the next entry in this
direction would be taken.Stop is the low (for Longs) or high (for
shorts) of theentry bar.Can anyone suggest How I can tackle
this?Check AmiBroker web page
at:<A
href="">http://www.amibroker.com/Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
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
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 the Yahoo! Terms of Service.
|