Dennis,
it is not necessary that price is near the ema until crosses occur.
i tried it out but i cannot get arrows without cross.
My test-formula:
FilterShort = Cross(EMA(C,34),C) ;
PlotShapes(FilterShort*shapedownArrow, colorred);
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g,
Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC(
C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 34, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color",
colorCycle ), ParamStyle("Style") );
_SECTION_END();
If you can't find the difference in your formula you can mail me or
put it into the thread.
Robert
--- In [email protected], "theoldchartreader"
<[EMAIL PROTECTED]> wrote:
>
> I agree with you that most of the time it is pilot error.
> I am getting sell arrows where there is no crossing of the ema (c,34)
> in fact the price is very far away from the ema.
>
> thank you for your help
> Dennis
>
>
>
>
>
>
>
>
> --- In [email protected], "sebastiandanconia"
> <sebastiandanconia@> wrote:
> >
> > Nope. Whenever that's happened to me it's invariably been
> > pilor-error, I've gotten exactly what I asked for even if it wasn't
> > what I really wanted.:)
> >
> > Just guessing from the code you posted if you're getting multiple
> > arrows when you only expect to see one you haven't defined the
> > condition specifically enough. I'd say you're getting EVERY cross
> > instead of just the one you're looking for.
> >
> > The "Exrem" function might help, or something like this:
> >
> > Sell=Cross(EMA(C,34),C) AND ref(Cross(EMA(C,34),C),-1)==0;
> >
> >
> > Luck,
> >
> > Sebastian
> >
>
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 other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/