Need seperate AFL code

#1
HI FRIENDS ..

Plz give me separate AFL coding for the followings ..

1. Magnified market price

2. seperate message box for today open,high,low,close,date ,time and script

3. remaining candle time .


Thanks
 

guptak03

Well-Known Member
#2
Magnified market price

HTML:
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,10,75,1);
GfxSelectFont("Arial", FS, 500, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlue) );
Hor=Param("Horizontal Position",500,500,500,500);
Ver=Param("Vertical Position",27,27,27,27);
GfxTextOut("L.T.P="+C,Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Arial", 14, 500, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor+5, Ver+45 );
_SECTION_END();
 

guptak03

Well-Known Member
#3
remaining candle time

PHP:
_SECTION_BEGIN("Time Left");
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
TimeFrame = Interval();
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;

x=Param("xposn",50,0,1000,1);
y=Param("yposn",380,0,1000,1);

GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) );
GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 );
if ( NewPeriod )
{
GfxSelectSolidBrush( colorYellow );
GfxSelectPen( colorYellow, 2 );
Say( "New period" );
}
//GfxRoundRect( x+45, y+40, x-3, y-2, 0, 0 );
//GfxSetBkMode(1);
GfxSelectFont( "Arial", 14, 700, False );
GfxSetTextColor( colorRed );
GfxTextOut( "Time Left :"+SecsToGo+"", x, y );
_SECTION_END();
 

guptak03

Well-Known Member
#4
seperate message box for today open,high,low,close,date ,time and script

PHP:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
 
#5
remaining candle time

PHP:
_section_begin("time left");
function getsecondnum()
{
time = now( 4 );
seconds = int( time % 100 );
minutes = int( time / 100 % 100 );
hours = int( time / 10000 % 100 );
secondnum = int( hours * 60 * 60 + minutes * 60 + seconds );
return secondnum;
}
requesttimedrefresh( 1 );
timeframe = interval();
secnumber = getsecondnum();
newperiod = secnumber % timeframe == 0;
secsleft = secnumber - int( secnumber / timeframe ) * timeframe;
secstogo = timeframe - secsleft;

x=param("xposn",50,0,1000,1);
y=param("yposn",380,0,1000,1);

gfxselectsolidbrush( colorrgb( 230, 230, 230 ) );
gfxselectpen( colorrgb( 230, 230, 230 ), 2 );
if ( newperiod )
{
gfxselectsolidbrush( coloryellow );
gfxselectpen( coloryellow, 2 );
say( "new period" );
}
//gfxroundrect( x+45, y+40, x-3, y-2, 0, 0 );
//gfxsetbkmode(1);
gfxselectfont( "arial", 14, 700, false );
gfxsettextcolor( colorred );
gfxtextout( "time left :"+secstogo+"", x, y );
_section_end();

thank u very much mr.uday.
 
#7
seperate message box for today open,high,low,close,date ,time and script

PHP:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();
MR.UDAY ji ....

i need this open high close time etc in seperate box ... not on the top of AFL .. plz help me ...
 
#8
MR.UDAY ji ....

i need this open high close time etc in seperate box ... not on the top of AFL .. plz help me ...
Code:
//Box
GfxSelectPen(colorLightgrey,1); 
GfxMoveTo(0,0); 
GfxLineTo(800,0); 
GfxLineTo(800,12); 
GfxLineTo(0,12); 
GfxLineTo(0,0);
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?