Net Lines AFL

#1
_SECTION_BEGIN("NetLines");

netbull= Sum(C<Ref(C,-1),3)==3;
netbear= Sum(C>Ref(C,-1),3)==3;

NLBL= ValueWhen(netbull,Ref(H,-2));
NLSL= ValueWhen(netbear,Ref(L,-2));

netline=IIf(BarsSince(NLBL)<BarsSince(NLSL),NLBL, NLSL);
Color= IIf(netline==NLBL,colorBlue, colorRed);

Plot(IIf(Ref(C,-1)< NLBL,NLBL,Null),"NLBL",colorBlue,styleDots|styleNoLine|styleThick);
Plot(IIf(Ref(C,-1)> NLSL,NLSL,Null),"NLSL",colorRed,styleDots|styleNoLine|styleThick);

Couleur= IIf(C> NLBL, colorBlue, IIf(C<NLSL, colorRed, colorBlack));
Plot( C, "Close", couleur, styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}
_SECTION_END();



can anybody add me below this code with top its code :

FS=Param(Font Size,30,11,100,1);
GfxSelectFont(Times New Roman, FS, 700, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor( ParamColor(Color,colorBlack) );
Hor=Param(Horizontal Position,890,1,1200,1);
Ver=Param(Vertical Position,12,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice(C,inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont(Times New Roman, 11, 700, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor(ParamColor(Color,colorYellow) );
GfxTextOut(""+DD+" (xx%)", Hor , Ver+45 );

thanx !
 

sr114

Well-Known Member
#2
Hi

this is for you

_SECTION_BEGIN("NetLines");

netbull= Sum(C<Ref(C,-1),3)==3;
netbear= Sum(C>Ref(C,-1),3)==3;

NLBL= ValueWhen(netbull,Ref(H,-2));
NLSL= ValueWhen(netbear,Ref(L,-2));

netline=IIf(BarsSince(NLBL)<BarsSince(NLSL),NLBL, NLSL);
Color= IIf(netline==NLBL,colorBlue, colorRed);

Plot(IIf(Ref(C,-1)< NLBL,NLBL,Null),"NLBL",colorBlue,styleDots|styleNo Line|styleThick);
Plot(IIf(Ref(C,-1)> NLSL,NLSL,Null),"NLSL",colorRed,styleDots|styleNoL ine|styleThick);

Couleur= IIf(C> NLBL, colorBlue, IIf(C<NLSL, colorRed, colorBlack));
Plot( C, "Close", couleur, styleNoTitle | ParamStyle("Style") | GetPriceStyle() );

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}
_SECTION_END();

_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
FS=Param("Font Size",28,11,100,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlack) );
Hor=Param("Horizontal Position",766,1,1200,1);
Ver=Param("Vertical Position",1,1,1,1);
GfxTextOut("Cls : "+C,Hor , Ver );

YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 12, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorViolet) );
//GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );

_SECTION_END();
 

Similar threads