try this one- On Wed, Sep 8, 2010 at 7:49 PM, inquisitive voyager < [email protected]> wrote:
> > > [Attachment(s)<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=tMWDK4VVLkE.en.&am=!HnqNg-A4riyxhZ4C2vB2xDbd5G4Oj82iIj0cEiUTOD47RHoW3qQ&fri#12af1b80909aeeb3_TopText>from > inquisitive voyager included below] > > just fixed the AFL errors. > no look into concept. > > On Wed, Sep 8, 2010 at 5:02 PM, Ken H <[email protected]> wrote: > >> >> >> Hi >> >> Can anyone assist me in fixing this code? >> >> I am trying to create a ribbon indicator to show when a MA cross over >> occurs. >> >> Many thanks >> >> Ken >> >> _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 >> ("MA"); >> P = >> ParamField("Price field",-1); >> Periods = >> Param("Periods", 15, 2, 300, 1, 10 ); >> Plot >> ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), >> ParamStyle("Style") ); >> _SECTION_END >> (); >> >> _SECTION_BEGIN >> ("MA1"); >> P = >> ParamField("Price field",-1); >> Periods = >> Param("Periods", 50, 2, 300, 1, 10 ); >> Plot >> ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), >> ParamStyle("Style") ); >> _SECTION_END >> (); >> Bull_Trend=( >> MA( Param("Periods", 15, 2, 300, 1, 10) )> 50); >> Bear_Trend=( >> MA( Param("Periods", 15, 2, 300, 1, 10 ) )< 50); >> Ribbon_kol= >> IIf( Bull_Trend, *colorDarkGreen*, IIf(Bear_Trend, *colorRed*,*colorRed*)) >> >> ; >> Plot >> (5, "ribbon", Ribbon_kol, *styleOwnScale*| *styleArea*|* >> styleNoLabel >> *,- >> 0.5,10); >> >> > > >
