please refer the image above.
the afl for this is below.
_SECTION_BEGIN("BW Fractal");
UpFractal= ValueWhen(
(Ref(H,-2) > Ref(H, -4)) AND
(Ref(H,-2) > Ref(H, -3)) AND
(Ref(H,-2) > Ref(H, -1)) AND
(Ref(H,-2) > H), Ref(H,-2));
DownFractal= ValueWhen(
(Ref(L,-2) <= Ref(L, -4)) AND
(Ref(L,-2) <= Ref(L, -3)) AND
(Ref(L,-2) <= Ref(L, -1)) AND
(Ref(L,-2) <= L), Ref(L,-2));
//== Added Crash crashandburn59 [at] hotmail.com solution
Plot(Ref(UpFractal,2), "Up Fractal", ParamColor("Up Fractal Color",colorRed),
ParamStyle("Up Fractal Style", styleDashed));
Plot(Ref(DownFractal,2), "Down Fractal",ParamColor("Down Fractal
Color",colorBlue), ParamStyle("Down Fractal Style", styleDashed));
//Plot(Max(HHV(H,3),Ref(UpFractal,2)), "Up Fractal", ParamColor("Up Fractal Color",colorRed), ParamStyle("Up Fractal Style", styleDashed));
//Plot(Max(HHV(H,3),Ref(UpFractal,2)), "Down Fractal",ParamColor("Down FractalColor",colorBlue), ParamStyle("Down Fractal Style", styleDashed));
_SECTION_END();
Plot(C,"",colorWhite,styleCandle);
_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 ) ) ));
_SECTION_END();
_SECTION_BEGIN("MA");
Len = IIf(Interval() > 300, 30, 60);
Disp = WriteIf(Interval() > 300, "MA30", "MA60");
Av = MA(C, Len);
ColorShow = IIf(Av > Ref(Av,-1) AND C > Av, colorGreen, IIf(Av < Ref(Av,-1) AND C < Av, colorRed, colorBlue));
Plot(Av, Disp, ColorShow ,styleLine+styleDots,styleThick,styleDots);
_SECTION_END();
ToolTip = "High = " + H + "\nOpen = " + O + "\nRange = " + (High-Low) +"\nTRUERange = " + (C-O) +"\nMID ="+((High+Low)/2)+ "\nClose = " + C + "\nLow = " + L;
_SECTION_BEGIN("Title");
Title = "";
HoD = TimeFrameGetPrice("H",inDaily);
LoD = TimeFrameGetPrice("L",inDaily);
Rng = HoD - LoD;
Mid = LoD + Rng/2;
//Draw the Panel Box
GfxSelectPen( colorBlack,1 );
GfxMoveTo(2,2);
GfxLineTo(2,30);
GfxLineTo(1044,30);
GfxLineTo(1044,2);
GfxLineTo(2,2);
GfxMoveTo(140,2);
GfxLineTo(140,30);
GfxMoveTo(430,2);
GfxLineTo(430,30);
GfxMoveTo(530,2);
GfxLineTo(530,30);
GfxSelectFont("Comic Sans MS Bold", 9, 800);
GfxSetTextColor(colorBlack);
GfxDrawText(Name(), 10, 3, 77, 20,0);
GfxDrawText(NumToStr(Interval()/60,2.0) + " Min", 82, 3, 140, 20,0);
GfxSelectFont("Comic Sans MS Bold", 7, 800);
GfxDrawText(Date(), 10, 18, 140, 30,0);
GfxSelectFont("Comic Sans MS Bold", 10, 800);
GfxSetTextColor(colorBlue);
GfxDrawText(" HoD:" + NumToStr(HoD,3.0), 148, 7, 240, 30,0);
GfxSetTextColor(colorRed);
GfxDrawText(" LoD:" + NumToStr(LoD,3.0), 242, 7, 340, 30,0);
GfxSetTextColor(colorBlack);
GfxDrawText(" Mid:" + NumToStr(Mid,3.0), 342, 7, 500, 30,0);
GfxDrawText(" Range:" + NumToStr(Rng,3.0), 437, 7, 620, 30,0);
GfxDrawText("Open: " + NumToStr(O,3.0), 537, 7, 740, 30,0);
GfxSetTextColor(colorBlue);
GfxDrawText("Hi: " + NumToStr(H,3.0), 647, 7, 740, 30,0);
GfxSetTextColor(colorRed);
GfxDrawText("Lo: " + NumToStr(L,3.0), 740, 7, 860, 30,0);
GfxSetTextColor(colorBlack);
GfxDrawText("Close: " + NumToStr(C,3.0), 840, 7, 980, 30,0);
GfxSetTextColor(colorBlack);
GfxDrawText("Volume: " + NumToStr(V,3.0), 940, 7, 1080, 30,0);
_SECTION_END();
GfxSetOverlayMode(1);
GfxSelectFont("Comic Sans MS Bold", Status("pxheight")/15 );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorRGB( 160, 160, 160 ) );
GfxSetTextColor( ColorHSB( 160, 0, 151 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( "STOP YOUR LOSS", Status("pxwidth")/2, Status("pxheight")/3 );
now what i need is the line noted as 1 should be green in colour and thick and dotted as in line noted as 3
and line noted as 2 should be red in colour and thick and dotted as in line noted as 3.
these 2 lines should be permanent and need not be changed with parameters.
thank you in advance.