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

Re: [amibroker] Re: Help with buy sell signals



PureBytes Links

Trading Reference Links

Don,

I am sure you read the help file for PlotShapes() function and the offset
feature.

      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
      Anthony

----- Original Message ----- 
From: "don" <donmac63@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, October 01, 2003 1:43 PM
Subject: Re: [amibroker] Re: Help with buy sell signals


> Sorry Stephane
>
> I should have removed the code I didn't want .
>
>  the top window of the chart is displayed using the code below.
>
> From reading the Help file I understand that the plotshapes function is
> plotted around Graph0.  The problem is that for each ticker the arrows are
> plotted at varing locations above and or below the center line and
sometimes
> out of sight(The center line being variable as determined by the variable
T,
> being = to 18 bars in this case ) .
>
> What I would like to do , if possable, is have the arrows plotted along
the
> center line
>
> I remember seeing a post or code in relation to this a while back but I
> forget where and how long ago.
>
> I'm going to have to compile a code snipit database or help file of  handy
> bits like this I think.
>
> At the moment I'm more of a Cut and Paste AFL Newbie
>
> The code you kindly posted plotted the same ( being my fault because I
> didn't remove the garbage in the first place).
>
>
>
> /*MA Diff by Larry Lovrencic*/
>
> /* Modified */
>
> T = Param("KMA Period", 18, 2, 150, 1); /*Variable Time Period for KMA*/
>
> KMA=((C-EMA(C,T))/EMA(C,T))*100;
>
>
> Buy = KMA > 0;
>
> Sell = KMA < 0;
>
> Cover = KMA > 0;
>
> Short = KMA < 0;
>
> Buy = ExRem( Buy, Sell );
>
> Sell = ExRem( Sell, Buy );
>
> Cover = ExRem( Cover, Short );
>
> Short = ExRem( Short, Cover );
>
> PlotShapes(IIf( Buy, shapeUpArrow,shapeNone),colorBrightGreen,0);
>
> PlotShapes(IIf( Sell, shapeDownArrow, shapeNone),colorRed,0);
>
> Graph0=KMA;
>
> Graph0Style=2+4;
>
> Graph0BarColor=IIf(KMA>0,5,4);
>
> GraphXSpace=5;
>
> Title=Name()+" "+Date()+" The Close is"+WriteIf(KMA>0," above"," below")+"
> KMA of " +WriteVal ((T),format=1) +" Bars by
> "+WriteVal(abs(KMA),format=1.2)+"%";
>
> Regards
>
>
> Don McKay
>
> ----- Original Message -----
> From: "Stephane Carrasset" <nenapacwanfr@xxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Thursday, October 02, 2003 12:37 AM
> Subject: [amibroker] Re: Help with buy sell signals
>
>
> > --- In amibroker@xxxxxxxxxxxxxxx, "don" <donmac63@xxxx> wrote:
> > > New User learning AFL
> > >
> > that's better to get separate buy && sell shapes
> > PlotShapes(IIf( buy, shapeUpArrow,shapeNone),colorGreen,0,L,-20);
> > PlotShapes(IIf( sell, shapeDownArrow, shapeNone),colorRed,H,C,-20);
> >
> >
> >
> > > centerline in the following code.
> > > Can someone please assist.
> > > thanks in advance
> > >
> > > /*MA Diff 20 by Larry Lovrencic*/
> > >
> > > Modified
> > >
> > > T = Param("KMA Period", 18, 2, 150, 1); /*Time Period for MA*/
> > >
> > > KMA=((C-EMA(C,T))/EMA(C,T))*100;
> > >
> > >
> > > Buy = KMA > 0;
> > >
> > > Sell = KMA < 0;
> > >
> > > Cover = KMA > 0;
> > >
> > > Short = KMA < 0;
> > >
> > > Buy = ExRem( Buy, Sell );
> > >
> > > Sell = ExRem( Sell, Buy );
> > >
> > > Cover = ExRem( Cover, Short );
> > >
> > > Short = ExRem( Short, Cover );
> > >
> > > shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
> > >
> > > PlotShapes( shape, IIf( Buy, colorBrightGreen , colorRed ),0, IIf(
> > Buy ,
> > > Low, High )) ;
> > >
> > > Graph0=KMA;
> > >
> > > Graph0Style=2+4;
> > >
> > > Graph0BarColor=IIf(KMA>0,5,4);
> > >
> > > GraphXSpace=5;
> > >
> > > Title=Name()+" "+Date()+" The Close is"+WriteIf(KMA>0," above","
> > below")+"
> > > KMA of " +WriteVal ((T),format=1) +" Bars by
> > > "+WriteVal(abs(KMA),format=1.2)+"%";
> > >
> > >
> > > Regards
> > >
> > > Don McKay
> >
> >
> >
> > 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
http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> 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 http://docs.yahoo.com/info/terms/
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/2003


------------------------ 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.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/