Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _SECTION_BEGIN("Background_Setting");
- SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
- ParamColor("BgBottom", colorBlack),ParamColor("titleblock",colorBlack ));
- _SECTION_END();
- _SECTION_BEGIN("BullBear Volume");
- C1 = Ref(C, -1);
- uc = C > C1; dc = C <= C1;
- ud = C > O; dd = C <= O;
- green = 1; blue = 2; yellow = 3; red = 4; white = 5;
- VType = IIf(ud,
- IIf(uc, green, yellow),
- IIf(dd,
- IIf(dc, red, blue), white));
- gv = IIf(VType == green, V, 0);
- yv = IIf(VType == yellow, V, 0);
- rv = IIf(VType == red, V, 0);
- bv = IIf(VType == blue, V, 0);
- uv = gv + bv; uv1 = Ref(uv, -1); /* up volume */
- dv = rv + yv; dv1 = Ref(dv, -1); /* down volume */
- /* create moving average period parameters */
- VolPer = Param("Adjust Vol. MA per.", 34, 1, 255, 1);
- ConvPer = Param("Adjust Conv. MA per.", 9, 1, 255, 1);
- /* create triple exponential moving avearges of separate up and down volume moving averages */
- MAuv = TEMA(uv, VolPer ); mauv1 = Ref(mauv, -1);
- MAdv = TEMA(dv, VolPer ); madv1 = Ref(madv, -1);
- MAtv = TEMA(V, VolPer );//total volume
- /* Switch for Horizontal lines indicating current level of positive and negative volume for ease in comparing to past highs/lows - toggle via parmameter window */
- OscillatorOnly = Param("Show Oscillator Only", 0, 0, 1, 1);
- CompareBullVolume = Param("Show Bull Level", 1, 0, 1, 1);
- if(CompareBullvolume AND !OscillatorOnly){
- }
- CompareBearVolume = Param("Show Bear Level", 1, 0, 1, 1);
- if(CompareBearVolume AND !OscillatorOnly){
- }
- /* Volume Segment Switches - toggle via parameter window */
- bullvolume = Param("Show Bull Volume", 1, 0, 1, 1);
- bearvolume = Param("Show Bear Volume", 1, 0, 1, 1);
- totalvolume = Param("Show Total Volume", 1, 0, 1, 1);
- /* plot volume lines and histograms if toggled on: */
- bearToFront = Param("Show Bear Vol in Front", 0, 0, 1, 1);
- if(bearToFront AND !OscillatorOnly){
- }
- if(bullvolume AND !OscillatorOnly){
- Plot(MAuv, "AVERAGE BULL VOLUME", colorBrightGreen, styleNoLine);
- }
- if(bearvolume AND !OscillatorOnly){
- Plot(MAdv, "AVERAGE BEAR VOLUME", colorRed, styleNoLine);
- }
- Plot(100,"",7,styleLine);
- Plot(70,"", colorPink, styleLine, styleLine);
- Plot(-100,"",1,styleLine);
- Plot (30, "", colorPink, styleLine, styleNoLabel);
- Plot(0,"",7,styleLine);
- _SECTION_BEGIN("Stoch K sell");
- SetChartOptions(0,0,ChartGrid30 | ChartGrid70 );
- r = StochK(15);
- Plot( r, "StochK )", colorBrightGreen);
- PlotOHLC( r,r,50,r, "", IIf( r > 50, colorBlue, colorRed ), styleCloud | styleClipMinMax, 30, 70 );
- _SECTION_END();
- Plot( Volume, "V", colorLightBlue, styleHistogram | styleOwnScale );
- _SECTION_BEGIN("trend");
- uptrend=PDI(20)>MDI(10)AND Signal(26)<MACD(13);
- downtrend=MDI(10)>PDI(20)AND Signal(26)>MACD(13);
- _SECTION_END();
- _SECTION_BEGIN("Magfied Market Price");
- //Magfied Market Price
- FS=Param("Font Size",15,11,100,1);
- GfxSelectFont("Times New Roman", FS, 700, True );
- GfxSetBkMode( colorWhite );
- GfxSetTextColor( ParamColor("Color",colorBlue) );
- Hor=Param("Horizontal Position",850,1,1200,1);
- Ver=Param("Vertical Position",110,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", 8, 600, True );
- GfxSetBkMode( colorBlack );
- GfxSetTextColor(ParamColor("Color",colorYellow) );
- GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+22 );
- _SECTION_END();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement