need your help to correct afl

muinali

Well-Known Member
#1
hi all
can anyone change from daily pivot calculation and pivot line into 60 min tm fram .






_SECTION_BEGIN("SwingN R");


SetChartBkColor(ParamColor("Outer panel color ",colorLightGrey)); // color of outer border
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",colorBlack,styleCandle);


ppl = ParamToggle("Plot Pivot Levels","Off|On",1);
numbars = LastValue(Cum(Status("barvisible")));
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
hts = -33.5;


/* This code calculates the previous days high, low and close */
Hi1 = IIf(Day()!=Ref(Day(),-1),Ref(HighestSince(Day()!=Ref(Day(),-1),H,1),-1),0);
Hi = ValueWhen(Day()!=Ref(Day(),-1),Hi1,1);
Lo1 = IIf(Day()!=Ref(Day(),-1),Ref(LowestSince(Day()!=Ref(Day(),-1),L,1),-1),0);
Lo = ValueWhen(Day()!=Ref(Day(),-1),Lo1,1);
Cl1 = IIf(Day()!=Ref(Day(),-1),Ref(C,-1),0);
C1 = ValueWhen(Day()!=Ref(Day(),-1),Cl1,1);

//----------------------------------------------------------------------------------

/* This code calculates Daily Piovts */

rg = (Hi - Lo);
bp = (Hi + Lo + C1)/3; bpI = LastValue (bp,1);
r1 = (bp*2)-Lo; r1I = LastValue (r1,1);
s1 = (bp*2)-Hi; s1I = LastValue (s1,1);


if(ppl==1) {
Plot(bp,"",colorBlue,styleLine|styleLine|styleNoRescale);

PlotText(" Pivot = " + WriteVal(bp,fraction), LastValue(BarIndex())-(numbars/Hts), bpI +0.05, colorBlue);
PlotText(" r1 = " + WriteVal(r1,fraction), LastValue(BarIndex())-(numbars/Hts), r1I +0.05, colorGreen);
PlotText(" s1 = " + WriteVal(s1,fraction), LastValue(BarIndex())-(numbars/Hts), s1I +0.05, colorRed);

}

_SECTION_END();
 

muinali

Well-Known Member
#2
I will charge 5000 and I will demonstrate it on real time NIFTY SPOT. What do you mean by adding/deleting. Obviously, you will pay once I demonstrate it on my PC. I will not release anything until I've been paid. I will accept either bank transfer or cheque or cash. I will provide support for 3 months.
dont offer such thing if you dont code anything ,
someone is doing business here .otherwise next time i will post you name too
 
Last edited:

johnnypareek

Well-Known Member
#3
hi all
can anyone change from daily pivot calculation and pivot line into 60 min tm fram .

_SECTION_BEGIN("SwingN R");


SetChartBkColor(ParamColor("Outer panel color ",colorLightGrey)); // color of outer border
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",colorBlack,styleCandle);


ppl = ParamToggle("Plot Pivot Levels","Off|On",1);
numbars = LastValue(Cum(Status("barvisible")));
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
hts = -33.5;


/* This code calculates the previous days high, low and close */
Hi1 = IIf(Day()!=Ref(Day(),-1),Ref(HighestSince(Day()!=Ref(Day(),-1),H,1),-1),0);
Hi = ValueWhen(Day()!=Ref(Day(),-1),Hi1,1);
Lo1 = IIf(Day()!=Ref(Day(),-1),Ref(LowestSince(Day()!=Ref(Day(),-1),L,1),-1),0);
Lo = ValueWhen(Day()!=Ref(Day(),-1),Lo1,1);
Cl1 = IIf(Day()!=Ref(Day(),-1),Ref(C,-1),0);
C1 = ValueWhen(Day()!=Ref(Day(),-1),Cl1,1);

//----------------------------------------------------------------------------------

/* This code calculates Daily Piovts */

rg = (Hi - Lo);
bp = (Hi + Lo + C1)/3; bpI = LastValue (bp,1);
r1 = (bp*2)-Lo; r1I = LastValue (r1,1);
s1 = (bp*2)-Hi; s1I = LastValue (s1,1);


if(ppl==1) {
Plot(bp,"",colorBlue,styleLine|styleLine|styleNoRescale);

PlotText(" Pivot = " + WriteVal(bp,fraction), LastValue(BarIndex())-(numbars/Hts), bpI +0.05, colorBlue);
PlotText(" r1 = " + WriteVal(r1,fraction), LastValue(BarIndex())-(numbars/Hts), r1I +0.05, colorGreen);
PlotText(" s1 = " + WriteVal(s1,fraction), LastValue(BarIndex())-(numbars/Hts), s1I +0.05, colorRed);

}

_SECTION_END();
Well,

What ever timeframe you select it will plot daily pivot try to change tf n pivot will not change.Now I assume that you need hourly pivot plot on time frame like 5min and you don't need daily pivot.

As per this chk out

HTML:
_SECTION_BEGIN("SwingN R");


SetChartBkColor(ParamColor("Outer panel color ",colorLightGrey)); // color of outer border
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",colorBlack,styleCandle);


ppl = ParamToggle("Plot Pivot Levels","Off|On",1);
numbars = LastValue(Cum(Status("barvisible")));
fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
hts = -33.5;
/*

/* This code calculates the previous days high, low and close
Hi1 = IIf(Day()!=Ref(Day(),-1),Ref(HighestSince(Day()!=Ref(Day(),-1),H,1),-1),0);
Hi = ValueWhen(Day()!=Ref(Day(),-1),Hi1,1);
Lo1 = IIf(Day()!=Ref(Day(),-1),Ref(LowestSince(Day()!=Ref(Day(),-1),L,1),-1),0);
Lo = ValueWhen(Day()!=Ref(Day(),-1),Lo1,1);
Cl1 = IIf(Day()!=Ref(Day(),-1),Ref(C,-1),0);
C1 = ValueWhen(Day()!=Ref(Day(),-1),Cl1,1);

//----------------------------------------------------------------------------------
*/
/* This code calculates Daily Piovts */
TimeFrameSet(inHourly);
rg = (H - L);
bp = (H + L + C)/3; bpI = LastValue (bp,1);
r1 = (bp*2)-L; r1I = LastValue (r1,1);
s1 = (bp*2)-H; s1I = LastValue (s1,1);

TimeFrameRestore();
bp=TimeFrameExpand(bp,inHourly);
r1=TimeFrameExpand(r1,inHourly);
s1=TimeFrameExpand(s1,inHourly);


if(ppl==1) {
Plot(bp,"",colorBlue,styleLine|styleLine|styleNoRescale);

PlotText(" Pivot = " + WriteVal(bp,fraction), LastValue(BarIndex())-(numbars/Hts), bpI +0.05, colorBlue);
PlotText(" r1 = " + WriteVal(r1,fraction), LastValue(BarIndex())-(numbars/Hts), r1I +0.05, colorGreen);
PlotText(" s1 = " + WriteVal(s1,fraction), LastValue(BarIndex())-(numbars/Hts), s1I +0.05, colorRed);

}

_SECTION_END();
 

muinali

Well-Known Member
#4
thanx a lot , need more help to improve it :)
 
#5
Re: need your help to create afl

Hi johnnypareek,

Can you help users by creating afl which will help traders know the of activity of other market stocks in realtime and make max out of it.






Regards,
Kedarnath
 

muinali

Well-Known Member
#6
hi jonny
this is ,how it should look like . i am try to get as in snap . i dont know exactly what it is ?but for me it should work as sentiment of trend or stoploss like something
appreciated what you did in this segment.........





Uploaded with ImageShack.us
 

Similar threads