My trades based on "new way of pivot trading" and vwap

vijkris

Learner and Follower
[/QUOTE]


here's the code which displays pdh and pdl of obv.

Code:
SetChartBkGradientFill( ParamColor("Inner panel upper",colorDarkGrey),ParamColor("Inner panel lower",colorGrey40 ));
SetChartBkColor(colorBlack);
SetChartOptions( 2,chartShowArrows+ chartShowDates |   chartWrapTitle );
_SECTION_BEGIN("OBV");
Plot( OBV(), _DEFAULT_NAME(), ParamColor("Color", colorOrange ), ParamStyle("Style")  );
_SECTION_END();

_SECTION_BEGIN("EMA36");
P = OBV();
Periods = Param("Periods", 36, 2, 300, 1, 0 );
EMA36 = EMA(P,Periods);
Plot( EMA36, _DEFAULT_NAME(), ParamColor( "Color", colorBrightGreen ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("EMA1");
P = OBV();
Periods = Param("Periods", 200, 2, 300, 1, 0 );
EMA1 = EMA(P,Periods);
Plot( EMA1, _DEFAULT_NAME(), ParamColor( "Color", colorPink ), ParamStyle("Style",styleDashed|styleNoRescale) ); 
_SECTION_END();

impureUp = OBV()>EMA1;
impureDown = OBV()<EMA1;

Clr = IIf(impureUp,colorGreen,IIf(impureDown,colorRed,colorGrey40));
//Plot(8, "", Clr, styleArea|styleOwnScale, 0, 100, 0, -1) ;

Buy = Cross(OBV(),EMA1);
Sell = Cross(EMA1,OBV());

PlotShapes(Buy*shapeUpArrow,colorGreen,0,EMA1,-20);
PlotShapes(Sell*shapeDownArrow,colorRed,0,EMA1,-20);
/*
Buy1 = Cross(OBV(),EMA36) AND EMA36>EMA1;
Sell1 = Cross(EMA36,OBV())AND EMA36<EMA1;

PlotShapes(Buy1*shapeUpArrow,colorBlue,0,EMA36,-20);
PlotShapes(Sell1*shapeDownArrow,colorBlue,0,EMA36,-20);
*/
///////////////////////////////////////////////////////////////////////////////////////////////
Filterdaych = ParamToggle("Filter Day Change Connections", "No|Yes", 1) ;
dt = DateTime() ;

	dtnum = DateTimeConvert(2, dt,TimeNum()) ;
	newdt = dtnum != Ref(dtnum, -1);
    

	Lastbar = H-H ;
	if (Filterdaych)
		Lastbar = dtnum != Ref(dtnum, 1) ; 
strnday = "day";
///////////////////////opening range//////////////


NewDay = Day()!= Ref(Day(), -1);
highestoftheday = refhigh = HighestSince(newday,OBV(),1);
Lowestoftheday =Reflow = LowestSince(newday,OBV(),1);
////////////////////prevday obv//////////////
dt = DateTime() ;

	dtnum = DateTimeConvert(0, dt) ;
	newdt = dtnum != Ref(dtnum, -1) ;

	Lastbar = H-H ;
	if (Filterdaych)
		Lastbar = dtnum != Ref(dtnum, 1) ;

Refobvhigh = Refhigh;
Refobvlow = Reflow;
shift = Param("Shift", 0, -1, 0, 1) ;

prevdayvalueH = prevdayobvhigh = ValueWhen(Ref(newdt,1), Refobvhigh, 1); 
prevdayvalueL = prevdayobvlow = ValueWhen(Ref(newdt,1), Refobvlow,1);
if (shift == -1)
		{
			prevdayvaluehigh = prevdayobvH;
			prevdayvaluelow = prevdayobvL;	
			
		}



Plot(IIf(Lastbar,Null, prevdayvalueH),"Yesterday obvHigh",colorBlue,ParamStyle("yh style",styleThick| styleNoRescale));//+styleOwnScale);
Plot(IIf(Lastbar,Null, prevdayvalueL),"Yesterday obvLow",colorRed,ParamStyle("yh style", styleThick|styleNoRescale));//+styleOwnScale);
 

XRAY27

Well-Known Member
XRAY Sir, can you please sare your price pane afl?
Bhai !!!sorry for delay in reply i have not covered your post,below is the code just drag and drop it into your price chart !!!

PHP:
_SECTION_BEGIN("CH");
Ch = Param("ch", 5,1,15,1);
bi = Cum(1)-1;
cbar = Param("cbar",2,2,50,1);
function GetTop(bars) 
{
Top = H == HHV(H,2*bars) AND Ref(HHV(H,bars),bars) < H;
Top = Top AND LastValue(bi)-ValueWhen(Top,bi) > bars;
return Top;
}
function GetValley(bars)
{
Valley = L == LLV(L,2*bars) AND Ref(LLV(L,bars),bars) > L;
Valley = Valley AND LastValue(bi)-ValueWhen(Valley,bi) > bars;
return Valley;
}

P1 = GetTop(Ch);
V1 = GetValley(Ch);
P1 = IIf(P1,IIf(ValueWhen(P1,bi,2) < ValueWhen(V1,bi),P1,IIf(ValueWhen(P1,H,2) > H,False,P1)),P1);
P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi,IIf(ValueWhen(P1,bi,0) < ValueWhen(V1,bi,0),IIf(ValueWhen(P1,H,0) >= H,False,P1),P1),P1);
V1 = IIf(V1,IIf(ValueWhen(V1,bi,2) < ValueWhen(P1,bi),V1,IIf(ValueWhen(V1,L,2)<L,False, V1)),V1);
V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi ,IIf(ValueWhen(V1,bi,0) < ValueWhen(P1,bi,0),IIf(ValueWhen(V1,L,0) <= L, False,V1),V1),V1); 
RF=ValueWhen(P1,H);
SF=ValueWhen(V1,L);
RF1 = IIf(RF AND BarsSince(P1) <=cbar,RF,Null);
SF1 = IIf(SF AND BarsSince(V1) <=cbar,SF,Null);
Plot(RF1,"",colorBlue,styleDots | styleNoLine);
Plot(SF1,"",colorBlue,styleDots | styleNoLine); 
Plot(RF,"",colorIndigo,40+16);
Plot(SF,"",colorIndigo,40+16);
PlotShapes(IIf(P1, shapeSmallSquare,shapeNone),colorGreen,0,H,10);
PlotShapes(shapeSmallCircle*P1,colorBlack,0,H,10);
PlotShapes(IIf(V1, shapeSmallSquare,shapeNone),colorGreen,0,L,-10);
PlotShapes(shapeSmallCircle*V1,colorCustom12,0,L,-10);
_SECTION_END();
 
Last edited:

vijkris

Learner and Follower
Bhai !!!sorry for delay in reply i have not covered your post,below is the code just drag and drop it into your price chart !!!
There was "_" missing in the 1st line, so it gave error. Now rectified.
While doing copy paste these type of errors happen, but ppl don't understand, so posting it here b4 anyone says that afl is not working.

PHP:
_SECTION_BEGIN("CH");
Ch = Param("ch", 5,1,15,1);
bi = Cum(1)-1;
cbar = Param("cbar",2,2,50,1);
function GetTop(bars) 
{
Top = H == HHV(H,2*bars) AND Ref(HHV(H,bars),bars) < H;
Top = Top AND LastValue(bi)-ValueWhen(Top,bi) > bars;
return Top;
}
function GetValley(bars)
{
Valley = L == LLV(L,2*bars) AND Ref(LLV(L,bars),bars) > L;
Valley = Valley AND LastValue(bi)-ValueWhen(Valley,bi) > bars;
return Valley;
}

P1 = GetTop(Ch);
V1 = GetValley(Ch);
P1 = IIf(P1,IIf(ValueWhen(P1,bi,2) < ValueWhen(V1,bi),P1,IIf(ValueWhen(P1,H,2) > H,False,P1)),P1);
P1 = IIf(P1 AND ValueWhen(P1,bi,0) > bi,IIf(ValueWhen(P1,bi,0) < ValueWhen(V1,bi,0),IIf(ValueWhen(P1,H,0) >= H,False,P1),P1),P1);
V1 = IIf(V1,IIf(ValueWhen(V1,bi,2) < ValueWhen(P1,bi),V1,IIf(ValueWhen(V1,L,2)<L,False, V1)),V1);
V1 = IIf(V1 AND ValueWhen(V1,bi,0) > bi ,IIf(ValueWhen(V1,bi,0) < ValueWhen(P1,bi,0),IIf(ValueWhen(V1,L,0) <= L, False,V1),V1),V1); 
RF=ValueWhen(P1,H);
SF=ValueWhen(V1,L);
RF1 = IIf(RF AND BarsSince(P1) <=cbar,RF,Null);
SF1 = IIf(SF AND BarsSince(V1) <=cbar,SF,Null);
Plot(RF1,"",colorBlue,styleDots | styleNoLine);
Plot(SF1,"",colorBlue,styleDots | styleNoLine); 
Plot(RF,"",colorIndigo,40+16);
Plot(SF,"",colorIndigo,40+16);
PlotShapes(IIf(P1, shapeSmallSquare,shapeNone),colorGreen,0,H,10);
PlotShapes(shapeSmallCircle*P1,colorBlack,0,H,10);
PlotShapes(IIf(V1, shapeSmallSquare,shapeNone),colorGreen,0,L,-10);
PlotShapes(shapeSmallCircle*V1,colorCustom12,0,L,-10);
_SECTION_END();
 

XRAY27

Well-Known Member
There was "_" missing in the 1st line, so it gave error. Now rectified.
While doing copy paste these type of errors happen, but ppl don't understand, so posting it here b4 anyone says that afl is not working.
Edited !!! thanks for correcting !!!
 

vijkris

Learner and Follower
I know the meaning of pdh-pdl,but pdh-pdl of obv kya hai?how to use it?
pdh is yday's highest obv and pdl is yday's lowest obv value.

May be it can be used in the same way the pdh and pdl of price is used.
I don't know.
 

OneThatGotAway

Well-Known Member
You seems to have had fun with many Afl i can tell :xD

The most advanced computers & intelligent minds in the world are in the arena with you to take your cash
All you got is courage :xD

If below was chart .. what would be ideal SL placed ? say if investor was Dabang
Line to line theory says SL get out below 45 - 39
Max line keeps says 130 ,160 lol
 
Last edited:

vijkris

Learner and Follower
:confused:


did u mean this:
Enrique Miguel Iglesias Preysler (/ɛnˈriːkeɪ ɪˈɡlɛsiəs/; Spanish pronunciation: [enˈrike miˈɣel iˈɣlesjas pɾeizˈleɾ]; born 8 May 1975), known professionally as Enrique Iglesias, is a Spanish singer, songwriter, actor and record producer. He is widely regarded as the King of Latin Pop.[3][4] Iglesias started his career in the mid-1990s on an American Spanish-language record label Fonovisa Records under the name Enrique Martinez, before switching to the stage name Enrique Iglesias[5] and becoming one of the biggest stars in Latin America and the Hispanic market in the United States. By the turn of the millennium, he had made a successful crossover into the mainstream market and signed a multi-album deal with Universal Music Group for US $68 million with Universal Music Latino to release his Spanish albums and Interscope Records to release English albums. In 2010, he parted with Interscope Records and signed with another Universal Music Group label Republic Records to release bilingual albums. In 2015, Iglesias parted ways with Universal Music Group after a decade. He signed with Sony Music; his upcoming albums will be by Sony Music Latin in Spanish and RCA Records in English.[6
https://en.wikipedia.org/wiki/Enrique_Iglesias

Hmmm... test bhaiyya loves spanish music then. ;):thumb:
 
Last edited:

vijkris

Learner and Follower
You seems to have had fun with many Afl i can tell :xD

The most advanced computers & intelligent minds in the world are in the arena with you to take your cash
All you got is courage :xD

If below was chart .. what would be ideal SL placed ? say if investor was Dabang
Line to line theory says SL get out below 45 - 39
Max line keeps says 130 ,160 lol
test bhaiyya,
you are asking out of syllabus question. :annoyed:

Whatever be my answer, u have to award full marks to me. :p
My answer is sl below 50, 49.9, may be, as it looks like a pivot.
 

Similar threads