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

RE: [amibroker] Controlling GraphZOrder on Bar by Bar Basis



PureBytes Links

Trading Reference Links

Don: thanks for replying but I am not sure I was clear in my original message but WriteIf will do nothing for the plot order.  See FredTs message to me which is almost correct.
 
Ken


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Don Lindberg
Sent: Thursday, August 16, 2007 1:26 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Controlling GraphZOrder on Bar by Bar Basis

Ken,

Take a look at the WriteIf function. I think that will do what you want.

 

Donald F Lindberg


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Ken Close
Sent: Thursday, August 16, 2007 8:32 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Controlling GraphZOrder on Bar by Bar Basis

 

Seemingly simple one that is not answered in the help files.  Experimenting with bar by bar for loop and if statements does not work either.

 

I would like to plot two simple MACD area plots having similar y axis values.  Assume I make MACD1 Blue in color, MACD2 Red in color.

 

The GraphZOrder puts the first plotted variable on top and when the value of MACD1 is less than the value of MACD2, both are visible (plot in the back is above plot in the front).

 

However, when the value reverses so that MACD1 is greater than MACD2, then MACD2 is hidden from view (behind the area plot for MACD1).

 

Is it possible to "switch" which value is plotted on top so that as the values change, the greater value variable is always behind the lower value variable?

 

Again, my implmentation of a for loop with an if statement did not work.  I used two Plot statements within the loop.

 

Any suggestions?

 

Thanks,

 

Ken

 

 

for (i = 0; i < BarCount; i++)

{

if (MCD1[i] < MCD2[i])

{

Plot(MCD2," [" + WriteVal(Shrt,1.0) + "/" + WriteVal(lng,1.0) + "] MACD",colorRed,styleHistogram);

Plot(MCD1," [" + WriteVal(Shrt,1.0) + "/" + WriteVal(lng,1.0) + "] MACD",colorBlue,styleHistogram);

}

else

{

Plot(MCD1," [" + WriteVal(Shrt,1.0) + "/" + WriteVal(lng,1.0) + "] MACD",colorBlue,styleHistogram);

Plot(MCD2," [" + WriteVal(Shrt,1.0) + "/" + WriteVal(lng,1.0) + "] MACD",colorRed,styleHistogram);

}

}

 

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___