Sh315 with another tool

#11
bunti ji can you please share the afl for which pics are uploaded /??
Use below this i think its same

_SECTION_BEGIN("trend with pivot levels");
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
TimeFrameSet(inDaily);
wc=C;
TimeFrameRestore();
uptrend= Signal(18)<MACD(7);
downtrend= Signal(18)>MACD(7);
PRSI=RSI(14)>55 ;
NRSI=RSI(14)<45 ;
Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( PRSI, colorGreen, IIf( NRSI, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );


_SECTION_BEGIN("Chart");
MASK= ParamStyle("MASK",styleCandle| styleThick , maskAll);
barcolor=IIf(UPTREND,colorGreen,IIf(doWNTREND,colorRed,colorBlue));
Plot(C, "C", barcolor,MASK);

A=C>MA(C,50) ;
B=C<MA(C,50) ;
Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( A, colorGreen, IIf( B, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();

_SECTION_BEGIN("MA 50");
A=C>MA(C,50) ;
B=C<MA(C,50) ;
Plot( 4, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( A, colorBlue, IIf( B, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();

t=Param("t", 22, 1, 5000, 1);

/*Top = Sum(High, t) / t;
Bottom = Sum(Low, t) / t;
*/
Top = EMA(High, t) ;
Bottom = EMA(Low, t);

av=(Top+Bottom)/2;
mc=IIf(av>C, ParamColor("Trigger line Up Color", colorGold), ParamColor("Trigger line Dn Color", colorBlue));
Plot(av, "\nTrigger : ", mc, ParamStyle("Trigger line Style",styleStaircase,maskAll),0,0,0,9);
 

bunti_k23

Well-Known Member
#12
bunti ji can you please share the afl for which pics are uploaded /??
sure bro it is a simple sh315 afl with macd default parameters and trendlines study attached here it is,

_SECTION_BEGIN("315 cross"); Plot(Close,"Price",colorBlack, styleCandle); Plot(EMA(Close,3),"3EMA",colorBlue,style=styleThick); Plot(EMA(Close,15),"15EMA",colorRed,style=styleThick); Buy=Cross(EMA(Close,3),EMA(Close,15)); Sell=Cross(EMA(Close,15),EMA(Close,3)); Short=Sell; Cover=Buy; shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) ); _SECTION_END(); _SECTION_BEGIN("Magnified Market Price"); //by Vidyasagar, [email protected]// FS=Param("Font Size",30,11,100,1); GfxSelectFont("Times New Roman", FS, 700, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorBlack) ); Hor=Param("Horizontal Position",600,1,1200,1); Ver=Param("Vertical Position",1,1,830,1); GfxTextOut(""+C, Hor , Ver ); YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); GfxSelectFont("Times New Roman", 11, 700, True ); GfxSetBkMode( colorWhite ); GfxSetTextColor(ParamColor("Color",colorBlack) ); GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+45 ); _SECTION_END(); _SECTION_BEGIN("Ribbon"); no=Param( "Swing", 20, 1, 55 ); res=HHV(H,no); sup=LLV(L,no); avd=IIf(C>Ref(res,-1),1,IIf(Ctsl,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); _SECTION_END();


:thumb::thumb::thumb:
 

Profittaker

Well-Known Member
#13
sure bro it is a simple sh315 afl with macd default parameters and trendlines study attached here it is,

_SECTION_BEGIN("315 cross");
Plot(Close,"Price",colorBlack, styleCandle); Plot(EMA(Close,3),"3EMA",colorBlue,style=styleThick); Plot(EMA(Close,15),"15EMA",colorRed,style=styleThick); Buy=Cross(EMA(Close,3),EMA(Close,15)); Sell=Cross(EMA(Close,15),EMA(Close,3));
Short=Sell; Cover=Buy;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
_SECTION_END();

_SECTION_BEGIN("Magnified Market Price");
//by Vidyasagar, [email protected]//
FS=Param("Font Size",30,11,100,1);
GfxSelectFont("Times New Roman", FS, 700, True );
GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorBlack) );
Hor=Param("Horizontal Position",600,1,1200,1);
Ver=Param("Vertical Position",1,1,830,1);
GfxTextOut(""+C, Hor , Ver );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 11, 700, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorBlack) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+45 );
_SECTION_END();

_SECTION_BEGIN("Ribbon");
no=Param( "Swing", 20, 1, 55 );
res=HHV(H,no); sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(Ctsl,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();


:thumb::thumb::thumb:
Dear bunti_k23,
Error Showing in this afl. "Variable 'ctsl' used without having been initialized" . Kindly check this line .


_SECTION_BEGIN("Ribbon");
no=Param( "Swing", 20, 1, 55 );
res=HHV(H,no); sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(Ctsl,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
 

bunti_k23

Well-Known Member
#15
Dear bunti_k23,
Error Showing in this afl. "Variable 'ctsl' used without having been initialized" . Kindly check this line .


_SECTION_BEGIN("Ribbon");
no=Param( "Swing", 20, 1, 55 );
res=HHV(H,no); sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(Ctsl,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
Hello , you can also google it it is available on net i think it is in tj forum itself but i forgot in which section it is.
 

Similar threads