PureBytes Links
Trading Reference Links
|
Ron, What I sent was able to be just put into the IB and Apply. If you
scroll back (or zoom out) you will see digits along the bottom. I will
modify it to show arrows with buy signals. The buy signal will be on first
trading day of each week.
Plot(C, "Close", colorBlack, styleCandle);
//buy signal is at first trading day of each week
Buy = DayOfWeek() < Ref(DayOfWeek(),-1);
//find lowest price on the screen and call this price Z
cansee = Status("barvisible");
First = Cansee AND Ref(Cansee,-1)==0;
Last = Cansee AND Ref(Cansee,1)==0;
z = Ref(LLV(L,Last-first+1),-BarCount+1+Last);
// plot green up arrow at each buy signal
PlotShapes(shapeUpArrow*Buy, colorGreen, 0, z, 5);
The plotshapes will be green, on layer 0, located on the value of Z which is
the lowest price on the screen, and offset by 5 pixels.
Cheers,
Graham
http://e-wire.net.au/~eb_kavan/
-----Original Message-----
From: mrdavis9 [mailto:mrdavis9@xxxxxxxxxx]
Sent: Sunday, July 04, 2004 9:58 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] PlotShapes Help
Graham, thanks a lot for your quick response.
I put your creative code in an indicator window, but I have no idea of how
to make it work.
I am more likely to understand the concept of Cold Fusion than this
confusing creative coding of your's.
Hopefully, I will be able to start to understand "layers", "yposition" and
"offset" when I am able to see the User Manual Example modified to plot the
arows at the bottom of an indicator window. Thanks, Ron D
----- Original Message -----
From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, July 03, 2004 8:29 PM
Subject: RE: [amibroker] PlotShapes Help
> I have made this code to put shapes at the bottom of the window. The
overall
> chart is too much to put here, but this places year markers in a
compressed
> chart like P&F. I have tried to modify it for a normal price chart,
> hopefully have changed/modified the variables so that it works. Can be
seen
> if you turn off the Show Dates for the IB window.
>
> GraphXSpace = 5;
>
> Plot(C, "Close", colorblack, styleCandle);
> Dateends = ValueWhen(Year()!=Ref(Year(),-1), DateNum() );
>
> cansee = Status("barvisible");
> First = Cansee AND Ref(Cansee,-1)==0;
> Last = Cansee AND Ref(Cansee,1)==0;
> z = Ref(LLV(L,Last-first+1),-BarCount+1+Last);
> spot = round(dateends/10000)%10;
> digit = IIf( spot==0, shapeDigit0, IIf( spot==1, shapeDigit1, IIf(
spot==2,
> shapeDigit2, IIf( spot==3, shapeDigit3, IIf( spot==4, shapeDigit4, IIf(
> spot==5, shapeDigit5, IIf( spot==6, shapeDigit6, IIf( spot==7,
shapeDigit7,
> IIf( spot==8, shapeDigit8, shapeDigit9 )))))))));
> PlotShapes(digit*( spot != Ref(spot,-1) ), colorBlack, 0, z, 5);
> Plot( (spot != Ref(spot,-1))
> ,"",colorLightGrey,styleHistogram+styleLeftAxisScale);
>
>
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
>
> -----Original Message-----
> From: mrdavis9 [mailto:mrdavis9@xxxxxxxxxx]
> Sent: Sunday, July 04, 2004 8:55 AM
> To: amibroker
> Subject: [amibroker] PlotShapes Help
>
> I need help learning more about using PlotShapes. Below, I have pasted a
> plotshapes code that plots some of the arrows so high that they cannot be
> seen in the indicator window.
>
> I copied the first PlotShapes example from the user manual, and then
> inserted some of my items. I would sure appreciate it if an
> Amerbrokerian could finish modifying this User Manual example so that It
> will place the buy arrows all at the same level at the bottom of the
> indicator window. This is my very first need to work with "Layers",
> "yposition", and "offset". I seem to need working examples of the new
> things that I try to learn. I think is was Graham who correct an earlier
> example that I posted, but I was not able to get my mind around his
example.
> Maybe with the user manual example posted here, I can finally understand
how
> to do this. Thanks Ron D.
>
> Xdk=Cross(StochD(14),StochK(14));
>
> PlotShapes(
> IIf(Xdk,shapeUpArrow,colorGreen,layer=0,yposition=Graph0,offset=-12);
<<this
> is my start on the user manual example.
>
> PlotShapes(IIf(Xdk,shapeUpArrow+shapeNone,shapeNone),colorGreen);<<this is
> the code that plots arrows too high.
>
>
>
> SYNTAX PlotShapes( shape, color, layer = 0, yposition = graph0,
> offset = -12 );
> RETURNS NOTHING
> FUNCTION Plots arrows and other shapes on any chart pane.
> Parameters:
>
> a.. shape defines type of the symbol. when shape is zero nothing
is
> plotted values other than zero cause plotting various pre-defined shapes.
> Odd values plot shape BELOW indicator, even values plot shape ABOVE
> indicator.
> b.. color defines color of shape
> c.. layer defines layer number on which shapes are plotted
> d.. yposition defines Y-position where shapes are plotted (by
> default they are plotted 'around' graph0 (first indicator) line)
> e.. offset - (or distance) parameter (by default -12 ), Offset is
> expressed in SCREEN pixels. Negative offsets shift symbols down, positive
> offsets shift symbol up. To place the shape exactly at ypostion, specify 0
> as offset
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
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:
http://docs.yahoo.com/info/terms/
|