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

[amibroker] Re: How to set TC2000 as 'Data Source'



PureBytes Links

Trading Reference Links




below an example

BarsToTest = 1000;
Trade = IIf<FONT 
size=1>((BarIndex() > 
(LastValue(<FONT 
color=#0000ff size=1>BarIndex()) - BarsToTest)),<FONT 
color=#ff00ff size=1>1,<FONT color=#ff00ff 
size=1>0);
Buy= DayOfWeek<FONT 
size=1>()==5 AND 
Trade AND BarIndex<FONT 
size=1>() > 10;
Sell=0;<FONT 
color=#008000 size=1>// exit on applystop
BuyPrice= C ;
ApplyStop (stopTypeTrailing, stopModePoint, 
2*<FONT 
color=#0000ff size=1>ATR(<FONT color=#ff00ff 
size=1>10<FONT 
size=1>),exitatstop=True,volatile=False,reentrydelay=<FONT 
color=#ff00ff size=1>1) ;
 
Equity(1<FONT 
size=1>,0<FONT 
size=1>);
Plot(Close,<FONT color=#ff00ff 
size=1>"close",<FONT color=#0000ff 
size=1>IIf( Buy, colorGreen, <FONT 
color=#0000ff size=1>IIf(Sell , colorRed 
,1 )),<FONT 
color=#ff00ff size=1>64);<FONT color=#0000ff 
size=1>
PlotShapes(<FONT color=#0000ff 
size=1>IIf(Buy,
shapeUpArrow,shapeNone),colorGreen,<FONT 
color=#ff00ff size=1>0,C,-<FONT color=#ff00ff 
size=1>20); 
PlotShapes(<FONT color=#0000ff 
size=1>IIf(Sell,
shapeDownArrow,shapeNone),colorRed,<FONT 
color=#ff00ff size=1>0,H,-<FONT color=#ff00ff 
size=1>20);
Plot(<FONT color=#0000ff 
size=1>HighestSince(Buy, H - <FONT 
color=#0000ff size=1>ValueWhen(Buy,<FONT 
color=#ff00ff size=1>2*<FONT color=#0000ff 
size=1>ATR(10<FONT 
size=1>))),""<FONT 
size=1>,colorBlue,1<FONT 
size=1>);
Title=Name() + 
" ApplyStop Trail=" + 
WriteVal(<FONT 
color=#0000ff size=1>HighestSince(Buy, H - 
ValueWhen<FONT 
size=1>(Buy,2<FONT 
size=1>*ATR(<FONT 
color=#ff00ff size=1>10)))) + <FONT color=#0000ff 
size=1>EncodeColor(colorWhite) + <FONT 
color=#ff00ff size=1>" Open="+ <FONT color=#0000ff 
size=1>WriteVal(Open);
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  rocou 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Saturday, April 24, 2004 5:22 
  PM
  Subject: [amibroker] Amibroker -> Plot 
  Trailing Stop Level
  Hi traders,  May I ask for your help again 
  -how can I plot a " trailing stop line" that continouslyrepresents 
  the trailing stop level ?Thanks for your 
  helpRegardsRobert_____________________________________________________________MA1Pr=Optimize("MA1Pr",1,1,3,1);LBPr=Optimize("LBPr",3,3,9,1);LBD=Optimize("LBD",1,1,3,1);Buy 
  = Cross(BBandBot(Close,LBPr,LBD), EMA(Close,MA1Pr));Sell = 
  Cross(EMA(Close,MA1Pr), BBandTop(Close,LBPr,LBD));Short = Cross(EMA( 
  Close,MA1Pr), BBandTop(Close,LBPr,LBD));Cover = 
  Cross(BBandBot(Close,LBPr,LBD), EMA(Close,MA1Pr));ApplyStop(2, 2, 
  Optimize("max.loss stop level", 0.0055, 0.0005, 0.0100, 0.0005 ), 2, 
  False, 1 ); PositionSize = 
  100000;______________________________________________________________Send 
  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 
  __________ 
  NOD32 1.732 (20040422) Information __________This message was checked 
  by NOD32 antivirus system.<A 
  href="">http://www.nod32.com


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








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.