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

Re: [amibroker] Re: What am I doing wrong here?



PureBytes Links

Trading Reference Links




Gerard,
 
This is the result when I run it:
<IMG alt="" hspace=0 
src="png00230.png" align=baseline 
border=0>
 
With this formula:
A1=<FONT face=Verdana 
size=2>MACD()<<FONT face=Verdana 
size=2>Signal() <FONT 
size=2>;
A2=<FONT face=Verdana 
size=2>MA(<FONT face=Verdana 
size=2>C,<FONT face=Verdana 
size=2>5)<<FONT face=Verdana 
size=2>MA(<FONT face=Verdana 
size=2>MA(<FONT face=Verdana 
size=2>C,<FONT face=Verdana 
size=2>5),<FONT face=Verdana 
size=2>7)<FONT 
size=2>;
Plot(A1 
OR A2,""<FONT 
size=2>,7,<FONT 
size=2>24);//Test 
plot
Plot<FONT 
face=Verdana size=2>(A1 OR<FONT 
face=Verdana size=2> A2,""<FONT 
face=Verdana size=2>,<FONT 
face="Times New Roman">5,<FONT 
size=2>1);<FONT 
size=2>//Test plot
Plot<FONT 
size=2>(2.5,<FONT 
size=2>"ribbon", IIf<FONT 
size=2>( A1 OR 
A2, <FONT 
color=#0000ff>colorRed, 
colorGreen), <FONT 
size=2>styleOwnScale|<FONT 
size=2>styleArea|<FONT 
size=2>styleNoLabel, -0.5<FONT 
size=2>, 100 );<FONT 
size=2>
GraphXSpace<FONT 
size=2>=3;
<FONT 
color=#000000> 
Except for the red 
extending halfway and the green extending halfway at bars where the condition 
switches true/false, I don't see any problems.
On bars that are 
supposed to be green, the ribbon is indeed green, and 
etc...
 
If you want BOTH conditions to be true (red) or false 
(green), use AND instead.
 <FONT 
size=2>
Color=IIf( <FONT 
size=2>A1 AND<FONT 
size=2> A2 , 
colorRed , 
IIf(!A1 <FONT color=#ff0000 
size=2>AND !A2, colorGreen<FONT 
size=2>, colorBlue)<FONT 
size=2>);
Plot<FONT 
size=2>(2.5,<FONT 
size=2>"ribbon", color, <FONT 
size=2>styleOwnScale|<FONT 
size=2>styleArea|<FONT 
size=2>styleNoLabel, -0.5<FONT 
size=2>, 100 
);
<FONT 
size=2> <FONT 
size=2>
Perhaps you should try 
including the inputs for MACD(X,Y) and Signal(X,Y,Z), instead of the defaults to 
make sure they are returning the desired 
signals.<FONT 
color=#000000>
-Corey Saxe
 
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=gcfinance@xxxxxxxxxxx 
  href="">gerard_carey 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Monday, December 01, 2003 8:25 
  PM
  Subject: [amibroker] Re: What am I doing 
  wrong here?
  Nope, that doesn't do it.I reckon I've an error 
  somewhere in the following.IIf(MACD)<Signal() OR 
  MA(C,5)<MA(MA(C,5),7),colorRed,colorGreen),because while it produces a 
  plot, it does not conform to the requirements of the either/or 
  conditions.Can you spot anything?Regds Gerard-- In <A 
  href="">amibroker@xxxxxxxxxxxxxxx, 
  "Graham" <gkavanagh@x...> 
  wrote:GerardI plotted them onto a blank window and I get 2 sets of 
  ribbons with reds and greens varying along its length.It seems to work 
  on a blank plot screen, maybe you just need to add it to a custom price 
  window.Plot(2.5,"ribbonboth", IIf( MACD()<Signal() OR 
  MA(C,5)<MA(MA(C,5),7),colorRed, colorGreen), 
  styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );Plot(5,"ribbonmacd", 
  IIf( MACD()<Signal(), colorRed, 
  colorGreen),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 
  );Cheers,Graham<A 
  href="">http://groups.msn.com/ASXShareTrading> 
  <A 
  href="">http://groups.msn.com/FMSAustralia 
  > > -----Original Message-----> From: gerard_carey 
  [mailto:gcfinance@xxxx] > Sent: Tuesday, 2 December 2003 11:41 
  AM> To: amibroker@xxxxxxxxxxxxxxx> Subject: [amibroker] Re: What 
  am I doing wrong here?> > > Hi Graham,> > 
  In its 'current' form it is a trend indicator based on the MACD that 
  > plots along the bottom of the pane. Green for an uptrend when the 
  > MACD is above its Signal line, or red when it is below.> I 
  wish to include it in the built 'Price' indicator, no problems > 
  there.> I wish to include a further condition;> 
  MA(C,5)<MA(MA(C,5),7)> so that either of the conditions would 
  trigger the colour change. > Thats my problem.> > I hope 
  this clarifies the situation.> Thanks and Regds> Gerard> 
  > --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> 
  wrote:>  > Gerard, what are you trying to accomplish? 
  >  > The plot gives me a plot with red and green 
  areas.>  > Cheers,> Graham> <A 
  href="">http://groups.msn.com/ASXShareTrading> 
  <A 
  href="">http://groups.msn.com/FMSAustralia 
  >  > -----Original Message-----> From: Gerard Carey 
  [mailto:gcfinance@xxxx] > Sent: Tuesday, 2 December 2003 10:49 
  AM> To: AB Yahoo group> Subject: [amibroker] What am I doing 
  wrong here?>  >  > I'm trying to add the moving 
  average condition, MA(C,5)<MA(MA (C,5),7), to> the following 
  formula.> > > > Plot(2.5,"ribbon", IIf( 
  MACD()<Signal(), colorRed, colorGreen > > 
  ),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );> > > 
  > My efforts, one of which follows are so far to no avail. Plot> 
  (2.5,"ribbon",> > IIf( MACD()<Signal() OR 
  MA(C,5)<MA(MA(C,5),7), colorRed,> colorGreen),> > 
  styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );> > > > 
  What am I doing wrong here?> > I'd appreciate any help> > 
  Regds Gerard> > > > --> > <A 
  href="">http://www.fastmail.fm - mmm... 
  Fastmail...> > > > ------------------------ Yahoo! Groups 
  Sponsor ---------------------> ~--> Buy> > Ink 
  Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark> 
  Printer> > at MyInks.com. Free s/h on orders $50 or more to the US 
  & Canada. > > <A 
  href="">http://www.c1tracking.com/l.asp?cid=5511> 
  > <A 
  href="">http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM> 
  > 
  --------------------------------------------------------------------> 
  -~->> > > > Send BUG REPORTS to bugs@xxxx> > 
  Send SUGGESTIONS to suggest@xxxx> > 
  -----------------------------------------> > 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> <A 
  href="">http://docs.yahoo.com/info/terms/> 
  > > > Send BUG REPORTS to bugs@xxxx> Send 
  SUGGESTIONS to suggest@xxxx> 
  -----------------------------------------> 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 <A 
  href="">http://docs.yahoo.com/info/terms/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 
  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.


Attachment: Description: ""