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

[amibroker] Re: Can I search in all 62000 messages in this group?



PureBytes Links

Trading Reference Links




Jim,
 
try this example
 
stephane

Sma = Param( 
"Speriod", <FONT 
color=#ff00ff size=1>4, <FONT color=#ff00ff 
size=1>3, 6<FONT 
size=1>,1 );
Mma = Param( 
"Mperiod", <FONT 
color=#ff00ff size=1>8, <FONT color=#ff00ff 
size=1>6, 12<FONT 
size=1>,1 );
Lma = Param( 
"Lperiod", <FONT 
color=#ff00ff size=1>12, <FONT color=#ff00ff 
size=1>12, 20<FONT 
size=1>,1 );
Sht= MA( Close, 
Sma );
Mid= MA( Close, 
Mma );
lng= MA( Close, 
Lma );
Sht1= C > sht;
Mid1= Sht > mid;
lng1= Mid > lng;
golong= Sht1 + Mid1 + lng1==3<FONT 
size=1>;
Sht1SO= C < sht;
Mid1SO= Sht < mid;
lng1SO= Mid < lng;
StayOut=(Sht1SO + Mid1SO + lng1SO)==<FONT color=#ff00ff 
size=1>3;
col = IIf( 
golong>=1<FONT 
size=1>,colorBlue, colorWhite );
col2=IIf<FONT 
size=1>(StayOut>=1<FONT 
size=1>,colorRed,colorWhite );<FONT color=#0000ff 
size=1>
Plot(Close,<FONT color=#ff00ff 
size=1>"close",<FONT color=#0000ff 
size=1>IIf(golong>=<FONT color=#ff00ff 
size=1>1,colorBlue,<FONT color=#0000ff 
size=1>IIf(StayOut>=<FONT color=#ff00ff 
size=1>1,colorRed,colorWhite)),<FONT 
color=#ff00ff size=1>64);<FONT color=#0000ff 
size=1>
Plot(golong>=<FONT color=#ff00ff 
size=1>1,<FONT color=#ff00ff 
size=1>"golong",
colorBlue,styleArea|styleOwnScale|styleNoLabel,<FONT 
color=#ff00ff size=1>0,<FONT color=#ff00ff 
size=1>30);
Plot(StayOut>=<FONT color=#ff00ff 
size=1>1,<FONT color=#ff00ff 
size=1>"StayOut",
colorRed,styleArea|styleOwnScale|styleNoLabel,<FONT 
color=#ff00ff size=1>0,<FONT color=#ff00ff 
size=1>30);
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  wd 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Monday, April 26, 2004 2:01 
PM
  Subject: [amibroker] Indicator and Plot 
  help
  Group,I am trying to convert and plot an indicator I 
  use for trend in anotherprogram, but I'm having trouble finishing it so it 
  can be plotted. I'mtrying to plot a price chart where 'golong' is blue, 
  'stayout' is red andwhite is when neither condition is true.Below is 
  my crude attempt so far. I left out the 'Plot' part because I don'thave a 
  clue as how to write it, so I don't know if the indicator itself iswritten 
  properly. Any help would be greatly 
  appreciated.ThanksJimSma = Param( "Speriod", 4, 3, 6,1 
  );Mma = Param( "Mperiod", 8, 6, 12,1 );Lma = Param( "Lperiod", 12, 12, 
  20,1 );Sht= MA( Close, Sma );Mid= MA( Close, Mma );lng= MA( Close, 
  Lma );Sht1= C > sht;Mid1= Sht > mid;lng1= Mid > 
  lng;golong= Sht1 + Mid1 + lng1==3;Sht1SO= C < sht;Mid1SO= Sht 
  < mid;lng1SO= Mid < lng;StayOut=(Sht1SO + Mid1SO + 
  lng1SO)==3;col = IIf( golong>=1,colorBlue, colorWhite 
  );col2=IIf(StayOut>=1,colorRed,colorWhite 
  );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.736 (20040426) 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.