[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

Thanks Tomasz, but seemingly this is insufficient information.
 
StyleClipMinMax is shown in the help files
 
 
but, when typing it into the code window, it does not turn Red like other style statements, ie, StyleCloud.  I tried various combinations but could not get it to do anything.
 
Now, after more searching, I found an example in the Library.  Curiously, when this is put into the code window, it works but styleClipMinMax is not colored red, yet this is a keyword.  Confusing at best, an ommission (small) on your part at worst.
 
But, this still will not do what I said I wanted because the ClipMax and ClipMin values must be constants in order to avoid the "incorrect type" error message that occurs when you try to put one colored variable in front of the other. In this application, it seems like the ClipMin and Max values are the MACD functions.
 
I cannot make it work but am experimenting with the code FredT shared in a different message, using Iff statements to make the Plot order change.  Partially but not fully successful yet.
 
Ken


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Tomasz Janeczko
Sent: Thursday, August 16, 2007 2:30 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Controlling GraphZOrder on Bar by Bar Basis

Ken,
 
You can not change z-order on bar-by-bar basis. Entire plot is made at once (all bars).
 
The code you have given will just generate BarCount plots in the same place and it will just run much slower.
 
 
Instead you should use styleClipMinMax that allows such compositions as you want.
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ken Close
Sent: Thursday, August 16, 2007 5:31 PM
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

__,_._,___