Thanks Herman, I was actually thinking of
something very similar but taking advantage of the Plot labels rather than
using PlotText:
MinY = Status ("AxisMinY");
MaxY = Status ("AxisMaxY");
for (j=0; j<numLines; j++) {
if (Line[j] >= MinY AND
Line[j] <= MaxY)
Plot( dailySR[j], "Line"+j, colorYellow, styleLine | styleNoRescale | styleNoTitle,Null,Null,10 );
}
This code does what I wanted.
Regards,
David
From: Herman
[mailto:psytek@xxxxxxxx]
Sent: 11/12/2007 8:59 AM
To: dbw451
Subject: Re: [amibroker] Plot
label displays
Play with this:
Plot(C,"",colorBlack,styleBar);
FirstVisibleBar = Status( "FirstVisibleBar" );
Lastvisiblebar = Status("LastVisibleBar");
TN=DateTime();
for( b = Firstvisiblebar; b <= Lastvisiblebar AND b < BarCount; b++)
{
PlotText("\n^\n"+StrLeft(StrRight(NumToStr(TN[b],formatDateTime),11),8),b,L[b],1);
}
Substitute time with your price and move
it to the left by subtracting a few barrs from b.
herman
For tips on developing Real-Time
Auto-Trading systems visit:
http://www.amibroker.org/userkb/
Monday, November 12, 2007, 8:51:01 AM,
you wrote:
>
|
Thanks Herman, but I do want labels, just not the
ones outside the viewable price range. I guess I could get the status
codes axisminy and axismaxy, then only plot the lines that are between the
two, but I was thinking there was a simpler solution.
Regards,
David
From: Herman [mailto:psytek@xxxxxxxx]
Sent: 11/12/2007 8:33 AM
To: dbw451
Cc: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Plot label displays
StyleNoLabels
:-)
herman
For tips on
developing Real-Time Auto-Trading systems visit:
http://www.amibroker.org/userkb/
Monday, November
12, 2007, 7:55:04 AM, you wrote:
>
|
Is there a plot style or maybe a chart
preference that turns off the display of labels for prices that are outside
the viewable chart area? I’m using the following plot
statement:
for (j=0; j<numLines;
j++) {
Plot( Line[j], "Line"+j, colorYellow, styleLine | styleNoRescale | styleNoTitle ,Null,Null,10 );
which plots
horizontal lines on a chart. For lines outside the price range of the
chart, the labels stack up at the top or bottom of the right hand side
label axis. Here’s an example snapshot:
How can I make only the labels within
the viewable price range display?
Thanks,
David
|
|