PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
Jayson,
Thanks for all of the help with this matter. What I wanted was
something very simple which was a static icon that could be placed
manually on the chart to indicate buys/sells that I have already
done, I'm trying to track several stocks over time to see if the
criteria for purchase has been accurate. I'm just starting to learn
how to use this program and will try the code that you supplied.
Thanks,
ron
> Ron,
>
> Perhaps we are on a different page. Plotshapes will plot shapes at
points on
> the chart or indicator where your code triggers a "True" value.
>
> example of a custom indicator;
>
> Buy=Cross(C,MA(C,50));
> Plot(C,"",colorBlue,1);
> PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen);
>
> would trigger a buy at the crossover of the 50 day moving average.
This
> would be automatic. What you suggest is drawing an arrow like you
would draw
> a trend line.
>
> placing the first 2 lines of code in the guru commentary would
plot the
> arrows on the price plot. Copying the buy and plptshapes lines to
the top of
> the builtin Price indicator window would also plot the arrows on
your price
> plot.
>
> the syntax from the help file......
>
> SYNTAX PlotShapes( shape, color, layer = 0, yposition = graph0,
offset
> = -12 );
>
> would translate to
>
> PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen,0,0,-
12); I have
> never gotton this to work for me. The arrows always drop to the
bottom of
> the chart. On a price chart I have found this to work.....
>
>
> Buy=Cross(C,MA(C,50));
> Plot(C,"",colorBlue,styleCandle);
> PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen,0,L-ATR
(1));
>
> which off sets the plot 1 atr below the low on the price chart.
Not sure why
> perhaps some one else can chip in here
>
>
>
>
> Jayson
> -----Original Message-----
> From: rmortonmd <ronmd@xxxx> [mailto:ronmd@x...]
> Sent: Friday, February 21, 2003 12:53 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: buy/sell arrows
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Jayson,
> Thanks for getting back to me so quickly. I am a new user and I've
> been having some trouble getting accustomed to the syntax of this
> program. I tried to set up a new indicator with the code for
> plotshapes, I got a syntax error after the "buy,". I entered a buy
> value above the line of code you gave me and then got a syntax
error
> on "plotshapes". HELP!! Assuming that I eventually get this
> working, wouldn't it be easier to have arrows placed on the drawing
> menu so that this could be clicked on the chart just like the text
> box, rectangle/ellipse etc?
> ron
>
> > Ron,
> > yes you can use plotshapes from help.....
> >
> > 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
> > Constants for shapes:
> > shapeNone, shapeUpArrow, shapeDownArrow,
shapeHollowUpArrow,
> > shapeHollowDownArrow, shapeSmallUpTriangle,
shapeSmallDownTriangle,
> > shapeHollowSmallUpTriangle, shapeHollowSmallDownTriangle,
> shapeUpTriangle,
> > shapeDownTriangle, shapeHollowUpTriangle,
shapeHollowDownTriangle,
> > shapeSmallSquare, shapeHollowSmallSquare, shapeSquare,
> shapeHollowSquare,
> > shapeSmallCircle, shapeHollowSmallCircle, shapeCircle,
> shapeHollowCircle,
> > shapeStar, shapeHollowStar, shapeDigit0, shapeDigit1,
shapeDigit2,
> > shapeDigit3, shapeDigit4, shapeDigit5, shapeDigit6, shapeDigit7,
> > shapeDigit8, shapeDigit9, shapePositionAbove
> >
> > EXAMPLE PlotShapes( IIF( buy, shapeDigit9 +
> shapePositonAbove,
> > shapeNone ), colorGreen );
> >
> >
> > Jayson
> > -----Original Message-----
> > From: rmortonmd <ronmd@xxxx> [mailto:ronmd@x...]
> > Sent: Friday, February 21, 2003 11:35 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] buy/sell arrows
> >
> >
> > I was wondering if there was a way that you could manually put
the
> > green (buy) and red(sell) arrows on a price chart as done in the
> > backtesting show trades. I would like a visual way of seeing the
> > days that I make trades.
> > ron
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> >
> >
> >
> > 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 the Yahoo! Terms of
> Service.
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> 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 the Yahoo! Terms of
Service.
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/
|