PureBytes Links
Trading Reference Links
|
Juan, here is some codes, <SPAN
class=235103701-24072003>to try
<SPAN
class=235103701-24072003>
<FONT
color=#000000>This would be if the condition x2 was true at the bar the cross
occured
x2=<FONT face="Courier New"
color=#0000ff size=1>IIf(<FONT
face="Courier New" color=#0000ff size=1>StDev<FONT face="Courier New"
size=1>(C,<FONT face="Courier New" color=#ff00ff
size=1>6)-<FONT face="Courier New"
color=#0000ff size=1>ATR(<FONT
face="Courier New" color=#ff00ff size=1>6<FONT face="Courier New"
size=1>)>0<FONT
face="Courier New" size=1> AND <FONT face="Courier New"
color=#0000ff size=1>StDev<FONT face="Courier New"
size=1>(C,<FONT face="Courier New" color=#ff00ff
size=1>6)-<FONT face="Courier New"
color=#0000ff size=1>Ref(<FONT
face="Courier New" color=#0000ff size=1>StDev<FONT face="Courier New"
size=1>(C,<FONT face="Courier New" color=#ff00ff
size=1>6),-<FONT
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New"
size=1>)<0<FONT
face="Courier New" size=1>,<FONT face="Courier New" color=#ff00ff
size=1>1,<FONT face="Courier New"
color=#ff00ff size=1>0<FONT face="Courier New"
size=1>);
Sell = cross(c,ema(c,13) )
and x2;
Coverl = cross(ema(c,13),C)
and x2;
and for the condition being
true at any time since entering the trade
buy =
......
short =
.............
<FONT
face=Arial>exrem(buy,sell);
<FONT
face=Arial>exrem(short,cover);
buyBars =
barssince(buy);
shortBars =
barssince(short);
Sell = cross(c,ema(c,13) )
and sum( x2,buybars)>0 ;
Coverl = cross(ema(c,13),C)
and sum(x2,shortbars)>0 ;
hoping this works ok, not
tested
<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName">
<B
><I
><SPAN
>Cheers<SPAN
class=GramE>,<?xml:namespace prefix = st1 ns =
"urn:schemas-microsoft-com:office:smarttags" /><st1:PersonName
><B
><I
><SPAN
>Graham
<A
href=""><FONT
color=#008080>http://groups.msn.com/ASXShareTrading
<A
href=""><FONT
color=#008080>http://groups.msn.com/FMSAustralia
<FONT
face=Tahoma size=2>-----Original Message-----From: emarco
[mailto:emarco@xxxxxxxxxxxxxxx] Sent: Thursday, 24 July 2003 3:23
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] help
with exit code
Can anyone help me with this
code :
I want to exit when the price is
below or above the 13 MA if this was <FONT face=Batang
color=#0000ff size=2>true when I had a position.
x2=<FONT face="Courier New"
color=#0000ff size=1>IIf(<FONT
face="Courier New" color=#0000ff size=1>StDev<FONT face="Courier New"
size=1>(C,<FONT face="Courier New" color=#ff00ff
size=1>6)-<FONT
face="Courier New" color=#0000ff size=1>ATR<FONT face="Courier New"
size=1>(6<FONT
face="Courier New" size=1>)><FONT face="Courier New" color=#ff00ff
size=1>0 AND <FONT
face="Courier New" color=#0000ff size=1>StDev<FONT face="Courier New"
size=1>(C,<FONT face="Courier New" color=#ff00ff
size=1>6)-<FONT
face="Courier New" color=#0000ff size=1>Ref<FONT face="Courier New"
size=1>(StDev<FONT
face="Courier New" size=1>(C,<FONT face="Courier New"
color=#ff00ff size=1>6),-<FONT
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New"
size=1>)<0<FONT
face="Courier New" size=1>,<FONT face="Courier New" color=#ff00ff
size=1>1,<FONT
face="Courier New" color=#ff00ff size=1>0<FONT face="Courier New"
size=1>);
How can I do that?
Thanks again
JuanSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
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.
|