My System - My trades.

MB ji since it is your baby can you post the AFL or allow me to do so. Your latest AFL is really a dream come true. May God Bless you always. And a sincere and genuine thanks to Happy Ji and Extremist ji in their endless support and Help.
Sir,

all credit goes to Happy Ji and Extermist Ji, I just tinkered around, coding is not my cup of tea :lol:
Code:
SetChartOptions(0,chartShowArrows|chartShowDates);
Ob = OBV();
//Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
n=Day() != Ref(Day(), -1);
a=LowestSince(n,V);

ll=ValueWhen(V==a,OBV());

Obcolor=IIf(Ob>EMA(OBV(),36)AND OBV()>ll,colorGreen,colorRed);

Plot(Ob,"Ob",Obcolor,styleThick,0,0,0,0,2);
_SECTION_BEGIN("Sessions");

Sessions=ParamToggle("Sessions","Off|On",1);

if(Sessions)
{

Ob = OBV();

LB = Day()!=Ref(Day(),1);		
Zero = ValueWhen(LB,Ob);	
T = TimeNum();		
T1 = T >= 105900 AND T <=110000;
T2 = T >= 125900 AND T <=130000;
T3 = T >= 142900 AND T <=143000;
Sessions = IIf(T>=142959, ValueWhen(T3,Ob), IIf(T>=125959, ValueWhen(T2,Ob), IIf(T>=105959, ValueWhen(T1,Ob), Zero)));
Plot(Sessions,"",ColorRGB(255,0,255),styleNoLabel|styleNoRescale|styleStaircase|styleLine,0,0,-1,-1);

}
_SECTION_END();


_SECTION_BEGIN("PDC"); 

PDC=ParamToggle("PDC","Off|On",1);

if(PDC)
{

ND = Day()!=Ref(Day(),-1);
LB   = Day()!=Ref(Day(),1);
Ob = OBV();
Zero = ValueWhen(LB,Ob);
Plot(Zero,"",colorRed,styleNoLabel|styleNoRescale|styleStaircase|styleDots,0,0,-2,-1);

}
_SECTION_END();

_SECTION_BEGIN("VKBand");
VKBand=ParamToggle("VKBand","Off|On",1);

if(VKBand)
{
Periods = Param("Periods", 20, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );


bTop=BBandTop( OBV(), periods, width );
bBottom=BBandBot( OBV(), periods, width );

eh=EMA(btop,2);

el = EMA(bbottom,2);

kt = MA(eh,8)+(0.4*ATR(8));
kb = MA(el,8)-(0.4*ATR(8));

vt = TEMA(kt,2);
vb = TEMA(kb,2);

Plot(vt,"\nVtop",colorAqua,styleThick);
Plot(vb,"\nVbot",colorPink,styleThick);
}
_SECTION_END();




_SECTION_BEGIN("OBVRibbon"); 

OBVRibbon=ParamToggle("OBVRibbon","Off|On",1);

if(OBVRibbon)
{

y = Param("Ribbon Y",5,0,500,5);

Ob = OBV();    Hi = HHV(Ob,15);    Lo = LLV(Ob,15); 

B1 = Cross(Ob,Ref(Hi,-1));    S1 = Cross(Ref(Lo,-1),Ob); 

B1 = ExRem(B1,S1);        S1 = ExRem(S1,B1); 

UP1 = Flip(B1,S1);        DN1 = Flip(S1,B1); 

e3 = EMA(Ob,3);  	e200 = EMA(Ob,200); 	e36 = EMA(Ob,36);
nd = Day()!=Ref(Day(),-1);	
lb = Day()!=Ref(Day(),1);
ob = OBV();	
zero = ValueWhen(lb,ob);

//Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
Plot(10,"",IIf(UP1,colorBrightGreen,colorRed),styleOwnScale|styleNoLabel|styleThick,0,500,0,-5,8); 
PlotOHLC(y,Y+10,y,y,"",IIf(UP1,colorBrightGreen,colorRed),styleOwnScale|styleNoLabel|styleCloud,0,500);
showVerticalObvlines15 = ParamToggle("Show vertical line for 15 ribbon change", "No|Yes", 0) ;
if (showVerticalObvlines15)
{
Plot(IIf(B1,1,0),"",colorBrightGreen,styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1);
Plot(IIf(S1,1,0),"",colorRed, styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1); //vertical lines
}

}
_SECTION_END();


_SECTION_BEGIN("OBVHOURLYHiLo");

OBVHOURLYHiLo=ParamToggle("OBVHOURLYHiLo","Off|On",1);

if(OBVHOURLYHiLo)
{

n = Param("Periods", 60, 15, 300, 15 );
Ob = OBV();
re = HHV(Ob,n); su = LLV(Ob,n);

Plot(re,"",colorOrange,styleNoLabel|styleNoRescale,0,0,2);
Plot(su,"",colorBrightGreen,styleNoLabel|styleNoRescale,0,0,2);
//PlotOHLC(ObHLo,ObHLo,ObHLo,ObHLo,"Cloud",ColorRGB(64,64,64),styleCloud|styleNoRescale,Null,Null,0,-3,0);
//PlotOHLC( re,  re,  su, su, "",ColorRGB(64,64,64),styleNoRescale|styleNoLabel|styleCloud,0,-3,1);
}
_SECTION_END();




_SECTION_BEGIN("EM");

EM=ParamToggle("EM","Off|On",1);

if(EM)
{
Ob = OBV();
Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
Plot( EMA( OBV(), 36 ), "EMA36OBV", colorYellow, styleDashed ,styleNoLabel|styleNoRescale );
Plot( EMA( OBV(), 200 ), "EMA200OBV", colorAqua, styleLine ,styleNoLabel|styleNoRescale );
m3=EMA(OBV(),36);
m4=EMA(OBV(),200);
//PlotOHLC(m3,m3,m4,m4,"Cloud",ColorRGB(64,64,64),styleCloud|styleNoRescale,Null,Null,0,-2,0);
}
_SECTION_END();

_SECTION_BEGIN("LVBar");

LVBar=ParamToggle("LVBar","Off|On",1);

if(LVBar)
{

n=Day() != Ref(Day(), -1);

a=LowestSince(n,V);
hh=ValueWhen(V==a,OBV());
ll=ValueWhen(V==a,OBV());

Plot(hh,"\nLVhb",colorGreen,styleDots);
//Plot(ll,"\nLVlb",colorred,styleDots);
}
_SECTION_END();
 
Why i insist on taking adds (we only get few adds on trending days) is because it takes care of bad days where your Sl hits twice and you stop trading. On friday this method could have given 300+ points at its full potential. These could have taken care of 7 days bad trades (with 2 bad trades a day with sl of 20 points each).
SL of 20 pts sounds too low for BNF
 

extremist

Well-Known Member
Sir,

all credit goes to Happy Ji and Extermist Ji, I just tinkered around, coding is not my cup of tea :lol:
Code:
SetChartOptions(0,chartShowArrows|chartShowDates);
Ob = OBV();
//Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
n=Day() != Ref(Day(), -1);
a=LowestSince(n,V);

ll=ValueWhen(V==a,OBV());

Obcolor=IIf(Ob>EMA(OBV(),36)AND OBV()>ll,colorGreen,colorRed);

Plot(Ob,"Ob",Obcolor,styleThick,0,0,0,0,2);
_SECTION_BEGIN("Sessions");

Sessions=ParamToggle("Sessions","Off|On",1);

if(Sessions)
{

Ob = OBV();

LB = Day()!=Ref(Day(),1);		
Zero = ValueWhen(LB,Ob);	
T = TimeNum();		
T1 = T >= 105900 AND T <=110000;
T2 = T >= 125900 AND T <=130000;
T3 = T >= 142900 AND T <=143000;
Sessions = IIf(T>=142959, ValueWhen(T3,Ob), IIf(T>=125959, ValueWhen(T2,Ob), IIf(T>=105959, ValueWhen(T1,Ob), Zero)));
Plot(Sessions,"",ColorRGB(255,0,255),styleNoLabel|styleNoRescale|styleStaircase|styleLine,0,0,-1,-1);

}
_SECTION_END();


_SECTION_BEGIN("PDC"); 

PDC=ParamToggle("PDC","Off|On",1);

if(PDC)
{

ND = Day()!=Ref(Day(),-1);
LB   = Day()!=Ref(Day(),1);
Ob = OBV();
Zero = ValueWhen(LB,Ob);
Plot(Zero,"",colorRed,styleNoLabel|styleNoRescale|styleStaircase|styleDots,0,0,-2,-1);

}
_SECTION_END();

_SECTION_BEGIN("VKBand");
VKBand=ParamToggle("VKBand","Off|On",1);

if(VKBand)
{
Periods = Param("Periods", 20, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );


bTop=BBandTop( OBV(), periods, width );
bBottom=BBandBot( OBV(), periods, width );

eh=EMA(btop,2);

el = EMA(bbottom,2);

kt = MA(eh,8)+(0.4*ATR(8));
kb = MA(el,8)-(0.4*ATR(8));

vt = TEMA(kt,2);
vb = TEMA(kb,2);

Plot(vt,"\nVtop",colorAqua,styleThick);
Plot(vb,"\nVbot",colorPink,styleThick);
}
_SECTION_END();




_SECTION_BEGIN("OBVRibbon"); 

OBVRibbon=ParamToggle("OBVRibbon","Off|On",1);

if(OBVRibbon)
{

y = Param("Ribbon Y",5,0,500,5);

Ob = OBV();    Hi = HHV(Ob,15);    Lo = LLV(Ob,15); 

B1 = Cross(Ob,Ref(Hi,-1));    S1 = Cross(Ref(Lo,-1),Ob); 

B1 = ExRem(B1,S1);        S1 = ExRem(S1,B1); 

UP1 = Flip(B1,S1);        DN1 = Flip(S1,B1); 

e3 = EMA(Ob,3);  	e200 = EMA(Ob,200); 	e36 = EMA(Ob,36);
nd = Day()!=Ref(Day(),-1);	
lb = Day()!=Ref(Day(),1);
ob = OBV();	
zero = ValueWhen(lb,ob);

//Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
Plot(10,"",IIf(UP1,colorBrightGreen,colorRed),styleOwnScale|styleNoLabel|styleThick,0,500,0,-5,8); 
PlotOHLC(y,Y+10,y,y,"",IIf(UP1,colorBrightGreen,colorRed),styleOwnScale|styleNoLabel|styleCloud,0,500);
showVerticalObvlines15 = ParamToggle("Show vertical line for 15 ribbon change", "No|Yes", 0) ;
if (showVerticalObvlines15)
{
Plot(IIf(B1,1,0),"",colorBrightGreen,styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1);
Plot(IIf(S1,1,0),"",colorRed, styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1); //vertical lines
}

}
_SECTION_END();


_SECTION_BEGIN("OBVHOURLYHiLo");

OBVHOURLYHiLo=ParamToggle("OBVHOURLYHiLo","Off|On",1);

if(OBVHOURLYHiLo)
{

n = Param("Periods", 60, 15, 300, 15 );
Ob = OBV();
re = HHV(Ob,n); su = LLV(Ob,n);

Plot(re,"",colorOrange,styleNoLabel|styleNoRescale,0,0,2);
Plot(su,"",colorBrightGreen,styleNoLabel|styleNoRescale,0,0,2);
//PlotOHLC(ObHLo,ObHLo,ObHLo,ObHLo,"Cloud",ColorRGB(64,64,64),styleCloud|styleNoRescale,Null,Null,0,-3,0);
//PlotOHLC( re,  re,  su, su, "",ColorRGB(64,64,64),styleNoRescale|styleNoLabel|styleCloud,0,-3,1);
}
_SECTION_END();




_SECTION_BEGIN("EM");

EM=ParamToggle("EM","Off|On",1);

if(EM)
{
Ob = OBV();
Plot(Ob,"",colorWhite,styleNoTitle|styleThick,0,0,0,0,2);
Plot( EMA( OBV(), 36 ), "EMA36OBV", colorYellow, styleDashed ,styleNoLabel|styleNoRescale );
Plot( EMA( OBV(), 200 ), "EMA200OBV", colorAqua, styleLine ,styleNoLabel|styleNoRescale );
m3=EMA(OBV(),36);
m4=EMA(OBV(),200);
//PlotOHLC(m3,m3,m4,m4,"Cloud",ColorRGB(64,64,64),styleCloud|styleNoRescale,Null,Null,0,-2,0);
}
_SECTION_END();

_SECTION_BEGIN("LVBar");

LVBar=ParamToggle("LVBar","Off|On",1);

if(LVBar)
{

n=Day() != Ref(Day(), -1);

a=LowestSince(n,V);
hh=ValueWhen(V==a,OBV());
ll=ValueWhen(V==a,OBV());

Plot(hh,"\nLVhb",colorGreen,styleDots);
//Plot(ll,"\nLVlb",colorred,styleDots);
}
_SECTION_END();
slightly refined version

Code:
SetChartOptions(0,chartShowArrows|chartShowDates);
Ob = OBV();
n=Day() != Ref(Day(), -1);
a=LowestSince(n,V);
ll=ValueWhen(V==a,OBV());
e36 =EMA(OB,36); 
e200 = EMA(OB,200);
Obcolor=IIf(Ob> e36 AND OB>ll,colorGreen,colorRed);
Plot(Ob,"Ob",Obcolor,styleThick,0,0,0,0,2);
if( ParamToggle("EMA 36 & 200 ", "No|Yes", 1))	
{
Plot( e36, "\nEMA36", colorYellow, styleDashed ,styleNoLabel|styleNoRescale );
Plot( e200, "\nEMA200", colorAqua, styleLine ,styleNoLabel|styleNoRescale );
}
if( ParamToggle("LVbar ", "No|Yes", 1))	
Plot(ll,"\nLVhb",colorblack,styleDots);

Sessions=ParamToggle("Sessions","Off|On",1);

if(Sessions)
{
LB = Day()!=Ref(Day(),1);		
Zero = ValueWhen(LB,Ob);	
T = TimeNum();		
T1 = T >= 105900 AND T <=110000;
T2 = T >= 125900 AND T <=130000;
T3 = T >= 142900 AND T <=143000;
Sessions = IIf(T>=142959, ValueWhen(T3,Ob), IIf(T>=125959, ValueWhen(T2,Ob), IIf(T>=105959, ValueWhen(T1,Ob), Zero)));
Plot(Sessions,"",ColorRGB(255,0,255),styleNoLabel|styleNoRescale|styleStaircase|styleLine,0,0,-1,-1);

}
PDC=ParamToggle("PDC","Off|On",1);

if(PDC)
{
Plot(Zero,"",colorRed,styleNoLabel|styleNoRescale|styleStaircase,0,0,-2,-1);

}

VKBand=ParamToggle("VKBand","Off|On",1);

if(VKBand)
{
Periods = Param("VKB Period", 20, 2, 300, 1 );
Width = Param("VKB Width", 2, 0, 10, 0.05 );


bTop=BBandTop( ob, periods, width );
bBottom=BBandBot( OB, periods, width );

eh=EMA(btop,2);

el = EMA(bbottom,2);

kt = MA(eh,8)+(0.4*ATR(8));
kb = MA(el,8)-(0.4*ATR(8));

vt = TEMA(kt,2);
vb = TEMA(kb,2);

Plot(vt,"\nVtop",colorAqua);
Plot(vb,"\nVbot",colorPink);
}

OBVRibbon=ParamToggle("OBVRibbon","Off|On",1);

if(OBVRibbon)
{

y = Param("Ribbon Y",5,0,500,5);

Hi = HHV(Ob,15);    Lo = LLV(Ob,15); 

B1 = Cross(Ob,Ref(Hi,-1));    S1 = Cross(Ref(Lo,-1),Ob); 

B1 = ExRem(B1,S1);        S1 = ExRem(S1,B1); 

UP1 = Flip(B1,S1);        DN1 = Flip(S1,B1); 

PlotOHLC(y,Y+10,y,y,"",IIf(UP1,colorBrightGreen,colorRed),styleOwnScale|styleNoLabel|styleCloud,0,500);
showVerticalObvlines15 = ParamToggle("Show vertical line for 15 ribbon change", "No|Yes", 0) ;
if (showVerticalObvlines15)
{
Plot(IIf(B1,1,0),"",colorBrightGreen,styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1);
Plot(IIf(S1,1,0),"",colorRed, styleOwnScale|styleNoLabel|styleHistogram|styleDashed,0,1); //vertical lines
}

}

OBVHOURLYHiLo=ParamToggle("HiLo 60 bar","Off|On",1);

if(OBVHOURLYHiLo)
{

n = Param("HiLo Period", 60, 15, 300, 15 );
re = HHV(Ob,n); su = LLV(Ob,n);

Plot(re,"",colorOrange,styleNoLabel|styleNoRescale,0,0,2);
Plot(su,"",colorBrightGreen,styleNoLabel|styleNoRescale,0,0,2);
}
 
Last edited:

Similar threads