Request for development of a new AFL

pkgmtnl

Well-Known Member
#1
Attention Coders,
Request your help in developing an AFL, which should when dropped on a chart, should give the following TEXT data should constantly be displayed on the chart while it is viewed at 1min Time interval:-

1) Total Turnover since the beginning of New Day ( Total Volume Since new day * C)/10^7 i.e. in Crores.
2) Turnover in segments of 15minutes since new day i.e. 9:15 AM to 9:30 AM, 9:30 AM to 9:45 AM...... alternatively this period can be customized
2) Turnover in segments of 30minutes since new day i.e. 9:15 AM to 9:45 AM, 9:45 AM to 10:15 AM...... alternatively this period can be customized
3) Turnover of Current candle at 1min time frame (assuming chart is viewed at 1min time frame);

The turnover should be in multiples of Crores.

can any1 help please?

Rgds
 

pkgmtnl

Well-Known Member
#2
_SECTION_BEGIN("turnover");

Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
TodayVolume = Sum(V,Bars_so_far_today);

GfxSelectFont("Arial Narrow", 9, 700 );

GfxSetTextColor( ParamColor("Color",colorPaleBlue) );
Hor1=Param("Horizontal Position1",380,10,1200,1);
Ver1=Param("Vertical Position2",17,400,1000,1550);
VC=TimeFrameGetPrice("fbc1",inDaily);
GfxTextOut("TOTAL = "+TodayVolume*C/10^7+"Cr",Hor1-290 , Ver1+75 );
GfxTextOut("Current TO = "+V*C/10^7,Hor1-290 , Ver1+95 );
VC1=TimeFrameGetPrice("V",in1Minute,-1);
GfxTextOut("TO-1 = "+VC1*Ref(C,-1)/10^7+"Cr",Hor1-290 , Ver1+115 );
VC2=TimeFrameGetPrice("V",in1Minute,-2);
GfxTextOut("TO-2 = "+VC2*Ref(C,-2)/10^7+"Cr",Hor1-290 , Ver1+135 );
VC3=TimeFrameGetPrice("V",in1Minute,-3);
GfxTextOut("TO-3 = "+VC3*Ref(C,-3)/10^7+"Cr",Hor1-290 , Ver1+155 );
VC4=TimeFrameGetPrice("V",in1Minute,-4);
GfxTextOut("TO-4 = "+VC4*Ref(C,-4)/10^7+"Cr",Hor1-290 , Ver1+175 );
VC5=TimeFrameGetPrice("V",in1Minute,-5);
GfxTextOut("TO-5 = "+VC5*Ref(C,-5)/10^7+"Cr",Hor1-290 , Ver1+195 );
VC6=TimeFrameGetPrice("V",in1Minute,-6);
GfxTextOut("TO-6 = "+VC6*Ref(C,-1)/10^7+"Cr",Hor1-290 , Ver1+215 );


/*
VC17=V;
GfxTextOut(";TC = "+VC17+"",Hor1-195 , Ver1+75 );
VC7=Ref(V,-1);
GfxTextOut(";LC-1 = "+VC7+" ",Hor1-195 , Ver1+90 );
VC8=Ref(V,-2);
GfxTextOut(";LC-2 = "+VC8+"",Hor1-195 , Ver1+105 );
VC9=Ref(V,-3);
GfxTextOut(";LC-3 = "+VC9+"",Hor1-195 , Ver1+120 );
VC10=Ref(V,-4);
GfxTextOut(";LC-4 = "+VC10+"",Hor1-195 , Ver1+135 );
VC11=Ref(V,-5);
GfxTextOut(";LC-5 = "+VC11+"",Hor1-195 , Ver1+150 );
VC12=Ref(V,-6);
GfxTextOut(";LC-6 = "+VC12+"",Hor1-195 , Ver1+165 );

EM1=EMA(C,200);
GfxTextOut("EMA200 = "+EM1+"",Hor1-65 , Ver1+90 );
EM2=EMA(C,100);
GfxTextOut("EMA100 = "+EM2+"",Hor1-65 , Ver1+105 );
EM3=EMA(C,50);
GfxTextOut("EMA 50 = "+EM3+"",Hor1-65 , Ver1+120 );
EM4=EMA(C,20);
GfxTextOut("EMA 20 = "+EM4+"",Hor1-65 , Ver1+135 );
EM5=EMA(C,8);
GfxTextOut("EMA 8 = "+EM5+"",Hor1-65 , Ver1+150 );
EM6=EMA(C,5);
GfxTextOut("EMA 5 = "+EM6+"",Hor1-65 , Ver1+165 );
*/
_SECTION_END();
 
Last edited:

Romeo1998

Well-Known Member
#3
good luck :)
Code:
Volume_since_start_of_day = SumSince(DateNum()!=Ref(DateNum(),-1),Volume);
GfxTextOut(NumToStr(LastValue(Volume_since_start_of_day),1.0),50,50);
 
Last edited:

Similar threads