logo





قديم 30-09-2007, 03:09 AM
  المشاركه #1
عضو هوامير المؤسس
تاريخ التسجيل: Aug 2005
المشاركات: 113
 

السلام عليكم ورحمة الله وبركاته
وكل عام وانتم بخير
وتقبل الله منا ومنكم الصيام والقيام
[html]
_SECTION_BEGIN(" Buff Volume Weighted Moving Averages ");
f=Param(" Fast Periods ",5,1,100);
fa=Sum(V*C,f)/Sum(V,f);
s=Param("Slow Periods ",10,1,50);
sl=Sum(V*C,s)/(Cum(V)-Ref(Cum(V),-s));
Plot (fa,"fast MA",1,2+5);
Plot (C,"close",5,2);
Plot (sl,"Slow MA",32,2);
Plot (fa,"fast MA",1,5);
Plot (C,"close",IIf(C>fa,5,1),1);
Plot (sl,"Slow MA",IIf(sl>fa,4,1),1);GraphXSpace=3;Title=Name ()+ " Buff Averages "+"\n"+ "Close = " + WriteVal (C,1.2) + " Fast MA = " + WriteVal (fa,1.2) + " Slow MA = "+ WriteVal (sl,1.2);
_SECTION_END();
[/html]

الموضوع الأصلي : اضغط هنا    ||   المصدر : منتدى هوامير البورصة السعودية

 
 
قديم 30-09-2007, 03:17 AM
  المشاركه #2
عضو هوامير المؤسس
تاريخ التسجيل: Aug 2005
المشاركات: 113
 

Buff Volume Weighted Moving Averages[/IMG]



قديم 01-10-2007, 06:25 AM
  المشاركه #3
سباق للخير
تاريخ التسجيل: Aug 2006
المشاركات: 7,691
 

جزاك الله كل خير يالغاالي.



قديم 02-10-2007, 03:45 AM
  المشاركه #4
عضو هوامير المؤسس
تاريخ التسجيل: Aug 2005
المشاركات: 1,815
 

لك الشكر الجزيل



قديم 02-10-2007, 04:11 AM
  المشاركه #5
عضو هوامير المؤسس
تاريخ التسجيل: Sep 2005
المشاركات: 1,546
 

حاولت احملها في ميتاستوك بس ماعرفت ممكن شرح لو تكرمت



قديم 02-10-2007, 04:51 AM
  المشاركه #6
سباق للخير
تاريخ التسجيل: Aug 2006
المشاركات: 7,691
 

يالغالي فهيد هذه خاصة بالإيمي بروكر وليس بالميتاستوك.



قديم 03-10-2007, 01:58 PM
  المشاركه #7
عضو هوامير المؤسس
تاريخ التسجيل: Aug 2005
المشاركات: 113
 

تعديل بسيط مع اضافة معادلة البيع والشراء وخاصية السكان هدية لحسين صمع

[HTML]
_SECTION_BEGIN(" Buff Volume Weighted Moving Averages ");
f=Param(" Fast Periods ",12,1,100);
f3=Param(" F3 ",34,1,100);
MAc=EMA(C,f3);
fa=Sum(V*MAc,f)/Sum(V,f);
s=Param("Slow Periods ",26,1,50);
sl=Sum(V*MAc,s)/(Cum(V)-Ref(Cum(V),-s));
Plot (fa,"fast MA",IIf(fa>Ref(fa,-1),5,4),5);
Plot (MAc,"close",IIf(MAc>sl AND MAc>fa ,5,1),2);
Plot (sl,"Slow MA",4,2);
Plot (fa,"fast MA",10,5);
Plot (MAc,"close",IIf(MAc>sl AND MAc>fa ,5,1),5);
Plot (sl,"Slow MA",IIf(sl>fa,4,1),5);Buy=MAc>fa AND Cross (MAc,sl);Sell=Cross (sl,MAc);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, 5, colorRed ),0, IIf( Buy, MAc, MAc) );GraphXSpace=3;Title=Name ()+ " Buff Averages "+"\n"+ "Close = " + WriteVal (C,1.2) + " Fast MA = " + WriteVal (fa,1.2) + " Slow MA = "+ WriteVal (sl,1.2);
_SECTION_END();
[/HTML]




قديم 03-10-2007, 03:01 PM
  المشاركه #8
عضو هوامير المميز
تاريخ التسجيل: May 2005
المشاركات: 16,644
 

بارك اللة فيك



قديم 04-10-2007, 08:50 AM
  المشاركه #9
عضو هوامير المميز
تاريخ التسجيل: Jul 2006
المشاركات: 257
 

الله يعطيك العافية



قديم 04-11-2014, 01:28 PM
  المشاركه #10
عضو هوامير المميز
تاريخ التسجيل: Jun 2011
المشاركات: 5,009
 

بارك الله في الجهود


_SECTION_BEGIN(" Buff Volume Weighted Moving Averages ");
f=Param(" Fast Periods ",12,1,100);
f3=Param(" F3 ",34,1,100);
MAc=EMA(C,f3);
fa=Sum(V*MAc,f)/Sum(V,f);
s=Param("Slow Periods ",26,1,50);
sl=Sum(V*MAc,s)/(Cum(V)-Ref(Cum(V),-s));
Plot (fa,"fast MA",IIf(fa>Ref(fa,-1),5,4),5);
Plot (MAc,"close",IIf(MAc>sl AND MAc>fa ,5,1),2);
Plot (sl,"Slow MA",4,2);
Plot (fa,"fast MA",10,5);
Plot (MAc,"close",IIf(MAc>sl AND MAc>fa ,5,1),5);
Plot (sl,"Slow MA",IIf(sl>fa,4,1),5);Buy=MAc>fa AND Cross (MAc,sl);Sell=Cross (sl,MAc);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, 5, colorRed ),0, IIf( Buy, MAc, MAc) );GraphXSpace=3;Title=Name ()+ " Buff Averages "+"\n"+ "Close = " + WriteVal (C,1.2) + " Fast MA = " + WriteVal (fa,1.2) + " Slow MA = "+ WriteVal (sl,1.2);
_SECTION_END();




قديم 04-11-2014, 02:38 PM
  المشاركه #11
عضو هوامير المؤسس
تاريخ التسجيل: Jul 2005
المشاركات: 2,313
 

بارك الله فيك وجزاك الخير

وهذي بنت عمها


_SECTION_BEGIN("Bull vs Bear");
SetChartBkColor(colorTeal);
//Plot( C, "Close", colorLightGrey, styleCandle, Zorder = 1);
SetChartOptions(0,chartShowArrows | chartShowDates);
/* basic variable defs
ud: up-Day (Close up from Open)
dd: down-Day (Close down from Open)
uc: up-Close (Close up from previous Close)
dc: down-Close: (Close down from previous Close)
*/
C1 = Ref(C, -1);
uc = C > C1; dc = C <= C1;
ud = C > O; dd = C <= O;

/*
Volume Day types:
green: up-day and up-close
yellow: up-day but down-close
red: down-day and down-close
blue: down-day but up-close
white: close equals open, close equals previous close

(currently unused vtypes are for enhancements)
*/
green = 1; blue = 2; yellow = 3; red = 4; white = 5;
VType = IIf(ud,
IIf(uc, green, yellow),
IIf(dd,
IIf(dc, red, blue), white));

/* green volume: up-day and up-close*/
gv = IIf(VType == green, V, 0);
/* yellow volume: up-day but down-close */
yv = IIf(VType == yellow, V, 0);
/* red volume: down-day and down-close */
rv = IIf(VType == red, V, 0);
/* blue volume: down-day but up-close */
bv = IIf(VType == blue, V, 0);

/* split up volume of up-close days from down-close days - (for the purposes of
this volume display indicator, up-days that closed down from the previous close
are considered bearish volume days, and conversely, down-days that nevertheless
closed up from the previous close are considered bullish volume days - my
testing indicates this is more accurate than using ordinary up-days and
down-days) */
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){
//Plot(SelectedValue(MAuv), "", colorGreen, styleLine);
}

CompareBearVolume = Param("Show Bear Level", 1, 0, 1, 1);
if(CompareBearVolume AND !OscillatorOnly){
//Plot(SelectedValue(MAdv), "", colorRed, styleLine);
}

/* 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){
//Plot(MAdv, "", colorRed, styleHistogram|styleNoLabel);
}
if(bullvolume AND !OscillatorOnly){
//Plot(MAuv, "Average Bull Volume", colorGreen, styleHistogram|styleNoLabel);
}
if(bearvolume AND !OscillatorOnly){
//Plot(MAdv, "Average Bear Volume", colorRed, styleHistogram|styleNoLabel);
}
if(totalVolume AND !OscillatorOnly){
//Plot(MAtv, "Total Volume", colorYellow, styleHistogram|styleNoLabel);
//Plot(MAtv, "", colorBlack, styleLine);
}
if(bullvolume AND !OscillatorOnly){
Plot(MAuv, "", colorBrightGreen, styleLine);
}
if(bearvolume AND !OscillatorOnly){
Plot(MAdv, "", colorRed, styleLine);
}

/* better visibility of zero line: */

Buy = Cross(MAuv,MAdv);

Sell = Cross(MAdv,MAuv);

Plot(0, "", colorBlue, 1);
PlotShapes(IIf(Buy AND bullvolume AND !OscillatorOnly ,shapeUpArrow,shapeNone),colorBlue,0);
PlotShapes(IIf(Sell AND bearvolume AND !OscillatorOnly,shapeDownArrow,shapeNone),colorRed,0);
/* Rise/Fall Convergence variables: */
Converge = (TEMA(MAuv - MAdv, ConvPer));
Converge1 = Ref(Converge, -1);
ConvergeUp = Converge > Converge1;
ConvergeOver = Converge > 0;
rising = ConvergeUp AND ConvergeOver;
falling = !ConvergeUp AND ConvergeOver;

/* Rise/Fall Convergence Oscillator Switch - toggle via parameter window -
(provides a better view of resulting combination of battling bull/bear volume
forces) */
convergenceOscillator = Param("Show Oscillator", 0, 0, 1, 1);
if(convergenceOscillator OR OscillatorOnly){
Plot(Converge, "Bull/Bear Volume Convergence/Divergence", colorViolet,
1|styleLeftAxisScale|styleNoLabel|styleThick);
Plot(0,"", colorYellow, 1|styleLeftAxisScale|styleNoLabel);
}

/********************************************************
Convergence Rise/Fall Shadows:

(provides a more easily visible display of rising and falling bull/bear
volume convergence) - toggle via parameter window

-posiitive Volume exceeding negative Volume: Light shadow
-negative volume exceeding positive volume: dark shadow
-if you use standard gray background - best shadows are:
-my greys: 14 = (216, 216, 216); 15 = (168, 168, 168));
-best substitute? using AB color constants?
-light: colorpalegreen; dark: colorRose;?
-(depends on your color scheme - customize to your tastes)
**********************************************************/

/* uncomment if you use my custom color greys: */
riseFallColor = IIf(rising, 14,15); //my custom shadow greys

/* comment out if you use my custom color gray shadows: */
/* riseFallColor = IIf(rising, colorPaleGreen,colorRose); */

/* Rise/Fall Convergence Plot Switch - toggle via parameter window */
riseFallShadows = Param("Show RiseFallShadows", 0, 0, 1, 1);
if(riseFallShadows){
Plot(IIf(rising OR falling, 1, 0), "", riseFallColor,
styleHistogram|styleArea|styleOwnScale|styleNoLabel);
}
GraphXSpace = 0.5;
_SECTION_END();
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",20,20,600,1);
GfxSelectFont("Arial", FS, 700, italic = False, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorBlack));
Hor=Param("Horizontal Position",450,470,650,650);
Ver=Param("Vertical Position",22,22,22,22);
xx=Prec((MAuv /MAtv )*100,2);
yy=Prec((MAdv /MAtv )*100,2);

GfxSelectFont("Arial", 12, 750, italic = False, underline = False, True );
GfxSetBkMode( colorBlack );
GfxSetTextColor(ParamColor("Color",colorYellow) );
GfxTextOut("BULL - "+xx+"%", Hor-50, Ver );
GfxTextOut("BEAR - "+yy+"%", Hor+125, Ver );
_SECTION_END();




قديم 06-11-2014, 10:43 AM
  المشاركه #12
عضو هوامير المميز
تاريخ التسجيل: Dec 2011
المشاركات: 310
 

جزاكم الله خيرا







الكلمات الدلالية (Tags)

averages

,

buff

,

moving

,

volume

,

weighted


أدوات الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع



06:59 AM