Nirvana - The Discussion

sir i copied the above afl... the bottom line is still showing.... :(((


i think i wil just take it out by using parameter options....
 
Hello Mr Bafna

i am uploading an image of nse nifty in eod mode along with the Nirvana_18062012 modified. look at the image and tell where is the problem. where u r facing the inconsistencies?



regards
sr
there seems to be some other lines to in your chart.... like the green slope.... how can i get those.... i think its a price line of every close..... m i right...??
 
its nothing else - a ribbon showing the res and support - u cud disable thru the formula editor if u do not want this

sr
can u pls tell me how to disable it through formula editor??
 
RB

have u ever thought abut the trendline slopes - the green and red sloping lines are trendlines

sr
can u post the code for these lines pls sir...

can u also give any suggestion of the accumulation chart prob we discussed some 15 mins back.....??

i am reposting it hear for convinience....

here is a 15min chart



here is a 1 min chart



in one min chart all data goes and just blue dotted line comes in the.... same thing happens with daily charts....

please help me this is a very good afl....
 
Last edited:
yes i cud - but i am now in low lying mode - message me for the coded and for accudist -

sr
here is the code


// Accumulation or Bought/Distribution or Sold=====\\
//===========Matrix Series==========\\
//============\\


_SECTION_BEGIN("Flower");//=============\\

//Plot (Close,"", IIf( C > O, ParamColor("Up Color", colorGreen ), ParamColor("Down Color", colorRed )),ParamStyle( "Style", styleCandle | styleThick, maskAll));//
Title = StrFormat("\\c02 {{NAME}} | {{DATE}} | Open : %g | High : %g | Low : %g | Close : %g | Change = %.1f%% | Volume = " +WriteVal( V, 1.0 ) +" {{VALUES}}",O, H, L, C, SelectedValue( ROC( C, 1 )) );

_SECTION_END();//=================\\


_SECTION_BEGIN("Sup/Res Detail");//====================================\\
SupResPeriod = Param("LookBack Period", 50, 0, 200,1);
SupResPercentage = Param("Percentage", 100, 0, 200,1);
PricePeriod = Param("Price Period", 16, 0, 200,1);
SupportLinecolor = ParamColor( "Support Color", colorGreen );
SupportLinestyle = ParamStyle("Support Style", styleThick|8|styleNoLabel);
ResistanceLinecolor = ParamColor( "Resistance Color", colorRed );
Resistancestyle = ParamStyle("Resistance Style", styleThick|8|styleNoLabel);
_SECTION_END();//============================\\

_SECTION_BEGIN("Line Detail");//==============\\
OverBought = Param("OverBought Above", 200, 0, 400,1);
OverSold = Param("OverSold Bellow", -200, -400, 0,1);
_SECTION_END();//==================================\\

_SECTION_BEGIN("Trend Bought/Sold Detail");//=======================================\\
Smoother = Param("Trend Smoother", 5, 5, 20);
upcolor = ParamColor( "UpTrend Color", colorGreen );
Downcolor = ParamColor( "DownTrend Color", colorRed );
_SECTION_END();//===================================\\

_SECTION_BEGIN("Circle Detail");//=========================================\\
Warningcolor = ParamColor( "Warning/Watch Signal", colorWhite );
WatchColor = ParamColor( "Accumulation Zone", colorAqua );
EntryColor = ParamColor( "Entry Signal", colorGreen );
ProfitTakeColor = ParamColor( "Distribution Zone", colorAqua );
ExitColor = ParamColor( "Exit Signal", colorRed );
_SECTION_END();//=================================================\ \

_SECTION_BEGIN("Swing Sup/Res");//=========================================\\
Lookback=SupResPeriod;
PerCent=SupResPercentage;
Pds =PricePeriod;
Var=MACD();
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
Ut=Wilders(Up,Pds);
Dt=Wilders(Dn,Pds);
RSIt=100*(Ut/(Ut+Dt));
A1=RSIt; B2=RSI(pds); C3=CCI(pds); D4=StochK(pds); E5=StochD(pds);
F6=MFI(pds); G7=Ultimate(pds); H8=ROC(C,pds);
Osc=C3;
Value1 = Osc;
Value2 = HHV(Value1,Lookback);
Value3 = LLV(Value1,Lookback);
Value4 = Value2 - Value3;
Value5 = Value4 * (PerCent / 100);
ResistanceLine = Value3 + Value5;
SupportLine = Value2 - Value5;
baseline=IIf( Osc < 100 AND Osc > 10 ,50 ,IIf( Osc < 0 ,0,0));
Plot(ResistanceLine,"",SupportLinecolor,SupportLinestyle);
Plot(SupportLine,"",ResistanceLinecolor,Resistancestyle);
_SECTION_END();//================================================\\

_SECTION_BEGIN("Entry/Exit Detail");//=========================================\\
n=Smoother;
ys1=(High+Low+Close*2)/4;
rk3=EMA(ys1,n);
rk4=StDev(ys1,n);
rk5=(ys1-rk3)*200/rk4;
rk6=EMA(rk5,n);
UP=EMA(rk6,n);
DOWN=EMA(up,n);
Oo=IIf(up<down,up,down);
Hh=Oo;
Ll=IIf(up<down,down,up);
Cc=Ll;
barcolor2=IIf(Ref(oo,-1)<Oo AND Cc<Ref(Cc,-1),upcolor,IIf(up>down,upcolor,downcolor));
PlotOHLC( Oo,hh,ll,Cc, " Matrix - Accun or Bought/Dist or Sold", barcolor2, styleCandle);
Buy=Cross(up,OverSold);
Sell=Cross(OverBought,up);
PlotShapes (IIf(Buy, shapeUpArrow, shapeNone) ,EntryColor, layer = 0, yposition = -220, offset = 1 );
PlotShapes (IIf(Sell, shapeDownArrow, shapeNone) ,ExitColor, layer = 0, yposition = 220, offset = 1 );
_SECTION_END();//===================================\\

_SECTION_BEGIN("Overbought/Oversold/Warning Detail");//========================================\\
n=Smoother;
ys1=(High+Low+Close*2)/4;
rk3=EMA(ys1,n);
rk4=StDev(ys1,n);
rk5=(ys1-rk3)*210/rk4;
rk6=EMA(rk5,n);
UP=EMA(rk6,n);
DOWN=EMA(up,n);
Oo=IIf(up<down,up,down);
Hh=Oo;
Ll=IIf(up<down,down,up);
Cc=Ll;
barcolor2=IIf(Ref(oo,-1)<Oo AND Cc<Ref(Cc,-1),colorGreen,IIf(up>down,colorGreen,colorRed));
PlotOHLC( Oo,hh,ll,Cc, "", barcolor2, styleCandle|stylehidden );
UP=EMA(rk6,n);
UPshape = IIf(UP >= OverBought OR UP<=OverSold, shapeSmallCircle, shapeNone);
UPColor = IIf(UP>=210, ProfitTakeColor, IIf(UP<=-210, WatchColor, Warningcolor));
Plot(UP, "", colorGrey50, styleThick|stylehidden);
PlotShapes(UPShape, UPColor, 0, UP, 0);
_SECTION_END();//===================================\\

SetChartBkColor(colorDarkGrey);

_SECTION_BEGIN("Plot Lines");//============================================\\
Plot(OverBought,"",colorWhite,styleLine|styleNoLabel);
Plot(0,"",colorWhite,styleDashed|styleNoLabel);
Plot(OverSold,"",colorWhite,styleLine|styleNoLabel);
_SECTION_END();//================================================\\
//================================================\\
//================================================== =\\
//============End of Code============================\\
 

sr114

Well-Known Member
here is the code


// Accumulation or Bought/Distribution or Sold=====\\
//===========Matrix Series==========\\
//============\\


_SECTION_BEGIN("Flower");//=============\\

//Plot (Close,"", IIf( C > O, ParamColor("Up Color", colorGreen ), ParamColor("Down Color", colorRed )),ParamStyle( "Style", styleCandle | styleThick, maskAll));//
Title = StrFormat("\\c02 {{NAME}} | {{DATE}} | Open : %g | High : %g | Low : %g | Close : %g | Change = %.1f%% | Volume = " +WriteVal( V, 1.0 ) +" {{VALUES}}",O, H, L, C, SelectedValue( ROC( C, 1 )) );

_SECTION_END();//=================\\


_SECTION_BEGIN("Sup/Res Detail");//====================================\\
SupResPeriod = Param("LookBack Period", 50, 0, 200,1);
SupResPercentage = Param("Percentage", 100, 0, 200,1);
PricePeriod = Param("Price Period", 16, 0, 200,1);
SupportLinecolor = ParamColor( "Support Color", colorGreen );
SupportLinestyle = ParamStyle("Support Style", styleThick|8|styleNoLabel);
ResistanceLinecolor = ParamColor( "Resistance Color", colorRed );
Resistancestyle = ParamStyle("Resistance Style", styleThick|8|styleNoLabel);
_SECTION_END();//============================\\

_SECTION_BEGIN("Line Detail");//==============\\
OverBought = Param("OverBought Above", 200, 0, 400,1);
OverSold = Param("OverSold Bellow", -200, -400, 0,1);
_SECTION_END();//==================================\\

_SECTION_BEGIN("Trend Bought/Sold Detail");//=======================================\\
Smoother = Param("Trend Smoother", 5, 5, 20);
upcolor = ParamColor( "UpTrend Color", colorGreen );
Downcolor = ParamColor( "DownTrend Color", colorRed );
_SECTION_END();//===================================\\

_SECTION_BEGIN("Circle Detail");//=========================================\\
Warningcolor = ParamColor( "Warning/Watch Signal", colorWhite );
WatchColor = ParamColor( "Accumulation Zone", colorAqua );
EntryColor = ParamColor( "Entry Signal", colorGreen );
ProfitTakeColor = ParamColor( "Distribution Zone", colorAqua );
ExitColor = ParamColor( "Exit Signal", colorRed );
_SECTION_END();//=================================================\ \

_SECTION_BEGIN("Swing Sup/Res");//=========================================\\
Lookback=SupResPeriod;
PerCent=SupResPercentage;
Pds =PricePeriod;
Var=MACD();
Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
Ut=Wilders(Up,Pds);
Dt=Wilders(Dn,Pds);
RSIt=100*(Ut/(Ut+Dt));
A1=RSIt; B2=RSI(pds); C3=CCI(pds); D4=StochK(pds); E5=StochD(pds);
F6=MFI(pds); G7=Ultimate(pds); H8=ROC(C,pds);
Osc=C3;
Value1 = Osc;
Value2 = HHV(Value1,Lookback);
Value3 = LLV(Value1,Lookback);
Value4 = Value2 - Value3;
Value5 = Value4 * (PerCent / 100);
ResistanceLine = Value3 + Value5;
SupportLine = Value2 - Value5;
baseline=IIf( Osc < 100 AND Osc > 10 ,50 ,IIf( Osc < 0 ,0,0));
Plot(ResistanceLine,"",SupportLinecolor,SupportLinestyle);
Plot(SupportLine,"",ResistanceLinecolor,Resistancestyle);
_SECTION_END();//================================================\\

_SECTION_BEGIN("Entry/Exit Detail");//=========================================\\
n=Smoother;
ys1=(High+Low+Close*2)/4;
rk3=EMA(ys1,n);
rk4=StDev(ys1,n);
rk5=(ys1-rk3)*200/rk4;
rk6=EMA(rk5,n);
UP=EMA(rk6,n);
DOWN=EMA(up,n);
Oo=IIf(up<down,up,down);
Hh=Oo;
Ll=IIf(up<down,down,up);
Cc=Ll;
barcolor2=IIf(Ref(oo,-1)<Oo AND Cc<Ref(Cc,-1),upcolor,IIf(up>down,upcolor,downcolor));
PlotOHLC( Oo,hh,ll,Cc, " Matrix - Accun or Bought/Dist or Sold", barcolor2, styleCandle);
Buy=Cross(up,OverSold);
Sell=Cross(OverBought,up);
PlotShapes (IIf(Buy, shapeUpArrow, shapeNone) ,EntryColor, layer = 0, yposition = -220, offset = 1 );
PlotShapes (IIf(Sell, shapeDownArrow, shapeNone) ,ExitColor, layer = 0, yposition = 220, offset = 1 );
_SECTION_END();//===================================\\

_SECTION_BEGIN("Overbought/Oversold/Warning Detail");//========================================\\
n=Smoother;
ys1=(High+Low+Close*2)/4;
rk3=EMA(ys1,n);
rk4=StDev(ys1,n);
rk5=(ys1-rk3)*210/rk4;
rk6=EMA(rk5,n);
UP=EMA(rk6,n);
DOWN=EMA(up,n);
Oo=IIf(up<down,up,down);
Hh=Oo;
Ll=IIf(up<down,down,up);
Cc=Ll;
barcolor2=IIf(Ref(oo,-1)<Oo AND Cc<Ref(Cc,-1),colorGreen,IIf(up>down,colorGreen,colorRed));
PlotOHLC( Oo,hh,ll,Cc, "", barcolor2, styleCandle|stylehidden );
UP=EMA(rk6,n);
UPshape = IIf(UP >= OverBought OR UP<=OverSold, shapeSmallCircle, shapeNone);
UPColor = IIf(UP>=210, ProfitTakeColor, IIf(UP<=-210, WatchColor, Warningcolor));
Plot(UP, "", colorGrey50, styleThick|stylehidden);
PlotShapes(UPShape, UPColor, 0, UP, 0);
_SECTION_END();//===================================\\

SetChartBkColor(colorDarkGrey);

_SECTION_BEGIN("Plot Lines");//============================================\\
Plot(OverBought,"",colorWhite,styleLine|styleNoLabel);
Plot(0,"",colorWhite,styleDashed|styleNoLabel);
Plot(OverSold,"",colorWhite,styleLine|styleNoLabel);
_SECTION_END();//================================================\\
//================================================\\
//================================================== =\\
//============End of Code============================\\
use it

sr
 
sr114 sir.... please refer to the personal message i sent....
 
Thread starter Similar threads Forum Replies Date
wisp Trading Diary 12
T AmiBroker 1
Y AmiBroker 1
E AmiBroker 4
A AmiBroker 1649

Similar threads