هوامير البورصة منذ 2005


قديم 2009-06-27, 00:30
  المشاركه # 1
عضو هوامير المميز
انضم في: Jan 2007
المشاركات: 189
 


السلام عليكم
اخواني ابي معادله الموشرات التاليه للولث لاب
.. مؤشر .. ( Cum ) .. لبرنامج الولث لاب
مؤشر الـــ ( تربل بي )
مؤشرات البرنامج .. ( RWI )

وبي المعادله الصحيحه
{#OptVar1 6;4;12;1} // Peak/Trough detection control
{#OptVar2 15;3;30;3} // Sensitivity for matching rectangle peaks/troughs
{#OptVar3 10;0;30;2} // Breakout sensitivity

ChangeScale( #Daily ); // written for daily scale only

{$I 'Rectangles'}
var Bar, p, n: integer;
var breakPrice, stopPr: float;
var R: TRect;
var RectActive: boolean = false;
var enBreakEvenStop: boolean = false;
var PeakTroughPct: float = #OptVar1;
var SensitivityPct: float = #OptVar2 / 10;
var boSensitivityPct: float = #OptVar3 / 10;

{* Initialize the list of rectangles, rectList *}
FindRectangles( PeakTroughPct, SensitivityPct, boSensitivityPct );

{* Access and print some values from the rectangles shown on the chart *}
Print( 'stBar' + #9 + 'idBar' + #9 + 'enBar' + #9 + 'T2');
for n := 0 to rectList.Count - 1 do
begin
R := rectList.Object( n ) as TRect;
Print( IntToStr( R.stBar ) + #9 + IntToStr( R.idBar )
+ #9 + IntToStr( R.enBar ) + #9 + FormatFloat( '0.00', R.T2 ) );
end;

PlotStops;
for Bar := 20 to BarCount - 1 do
begin
if LastPositionActive then
begin
p := LastPosition;
var pePrice: float = PositionEntryPrice( p );
if PositionLong( p ) then
begin
if not enBreakEvenStop then
enBreakEvenStop := PriceHigh( Bar ) >= R.T1;
if enBreakEvenStop then
stopPr := pePrice
else
stopPr := GetPositionRiskStop( p );
if not SellAtStop( Bar + 1, stopPr, p, 'Stop Loss' ) then
SellAtLimit( Bar + 1, R.T2, p, 'T2' );
end
else
begin
if not enBreakEvenStop then
enBreakEvenStop := PriceLow( Bar ) <= R.T1;
if enBreakEvenStop then
stopPr := pePrice
else
stopPr := GetPositionRiskStop( p );
if not CoverAtStop( Bar + 1, stopPr, p, 'Stop Loss' ) then
CoverAtLimit( Bar + 1, R.T2, p, 'T2' );
end;
end
else
begin { Entry logic }
if not RectActive then
begin
enBreakEvenStop := false;
n := rectList.IndexOf( Bar ); // was a rectangle identified on this bar?
if n > -1 then
begin
R := rectList.Object( n ) as TRect;
RectActive := true;
end;
end;
{ breakouts occur on R.enBar }
if RectActive and ( Bar = R.enBar ) then
begin
RectActive := false;
stopPr := ( R.tVal + R.pVal ) / 2;
SetRiskStopLevel( stopPr );
if Bar - R.stBar > 60 then // only trade rectangles that span at least 3 months (daily bars)
if R.breakUp then
begin
BuyAtMarket( Bar + 1, '' );
breakPrice := R.pVal * (1 + boSensitivityPct/100);
end
else
begin
ShortAtMarket( Bar + 1, '' );
breakPrice := R.tVal * (1 - boSensitivityPct/100);
end;
end;
end;
end;
HideVolume

عارف كثرت عليكم




📰 المصدر: قسم برامج التحليل الفني والاساسي – رابط الموضوع الأصلي

💬 ردود الأعضاء

قديم 2009-06-27, 01:00
  المشاركه # 2
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
السلام عليكم
اخواني ابي معادله الموشرات التاليه للولث لاب

مؤشر الـــ ( تربل بي )

عارف كثرت عليكم
بجاوبك بالي عندي


مشاركة: ابو غيدا والاخوان ممكن مساعدة
{$I 'BearPowerVG'}
{$I 'BullPowerVG'}
const SmoothBullBear = 20;
const SmoothBBB = 30;
var Bar, BullPane: integer;
var BullPowerVG1, BearPowerVG1: integer;
var BBB, BBBPane: integer;
{ Create Custom Chart Panes }
BullPane := CreatePane( 75, true, true );
BBBPane := CreatePane( 150, true, true );
{ Obtain and Plot the BullPower and BearPower, smoothed }
BullPowerVG1 := SMASeries( BullPowerVGSeries, SmoothBullBear );
PlotSeriesLabel( BullPowerVG1, BullPane, 050, #Thick, 'BullPower' );
BearPowerVG1 := SMASeries( BearPowerVGSeries, SmoothBullBear );
PlotSeriesLabel( BearPowerVG1, BullPane, 900, #Thick, 'BearPower' );
{ Calculate and Plot the smoothed BBB indicator }
BBB := SMASeries( SubtractSeries( BullPowerVG1, BearPowerVG1 ), SmoothBBB );
PlotSeriesLabel( BBB, BBBPane, #Navy, #ThickHist, 'BBB' );
{ Implement trading system rules }
for Bar := 60 to BarCount - 1 do
begin
SetSeriesBarColor( Bar, BBB, #Navy );
if MarketPosition = 0 then
begin
if @BBB
الرسم البياني لـ: BBB
[Bar] < 0 then
if TurnUp( Bar, BBB ) then
begin
SetSeriesBarColor( Bar, BBB, #Lime );
BuyAtMarket( Bar + 1, '' );
end;
end
else
begin
if @BBB
الرسم البياني لـ: BBB
[Bar] > 0 then
if TurnDown( Bar, BBB ) then
begin
SetSeriesBarColor( Bar, BBB, #Red );
SellAtMarket( Bar + 1, LastPosition, '' );
end;
end;
end;



قديم 2009-06-27, 01:03
  المشاركه # 3
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
السلام عليكم
اخواني ابي معادله الموشرات التاليه للولث لاب
مؤشرات البرنامج .. ( RWI )

RWI

اختصار ل Random Walk Indicator

هذي المعادلة مع اشارات الدخول والخروج

{$I 'Random Walk Indicator - Highs V1.1'}
{$I 'Random Walk Indicator - Lows V1.1'}
{$I 'WinLossBackground'}
var Bar: integer;
var RWIHighLong, RWIHighShort, RWILowLong, RWILowShort: integer;
RWIHighLong := RWIHighSeries(8, 64);
RWIHighShort := RWIHighSeries(2, 7);
RWILowLong := RWILowSeries(8, 64);
RWILowShort := RWILowSeries(2, 7);
for Bar := 64 to BarCount - 1 do
begin
{ Entry Rules }
if not LastPositionActive then
begin
if @RWILowLong
الرسم البياني لـ: RWILowLong
[Bar] > 1.0 then
if @RWIHighShort
الرسم البياني لـ: RWIHighShort
[Bar-1] > 1.0 then
if @RWIHighShort
الرسم البياني لـ: RWIHighShort
[Bar-1] > @RWIHighShort
الرسم البياني لـ: RWIHighShort
[Bar] then
ShortAtMarket(bar+1, '');
end
else
{ Exit Rules }
begin
if @RWIHighLong
الرسم البياني لـ: RWIHighLong
[Bar] > 1.0 then
if @RWILowShort
الرسم البياني لـ: RWILowShort
[Bar-1] > 1.0 then
if @RWILowShort
الرسم البياني لـ: RWILowShort
[Bar-1] > @RWILowShort
الرسم البياني لـ: RWILowShort
[Bar] then
CoverAtMarket(bar+1, LastPosition, '')

end;
end;
// color background
//WinLossBackground(1);


var BuyPane: integer;
BuyPane := CreatePane( 75, true, true );
PlotSeriesLabel( RWIHighLong, BuyPane, #green, #Thin, 'High Long' );

var SellPane: integer;
SellPane := CreatePane( 75, true, true );
PlotSeriesLabel( RWILowLong, SellPane, 900, #Thin, 'Low Long' );
{ Draw the result of our commentary to the volume pane }
var COMMENTARYSTRING: string;
CommentaryString := 'M O L Y';
DrawText( CommentaryString, 1, 4, 4, #white,15 );



وايضا عن طريق سحب المؤشرات وطبعا هي موجودة في جميع الاصدارات



قديم 2009-06-27, 01:09
  المشاركه # 4
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
السلام عليكم
وبي المعادله الصحيحه
{#OptVar1 6;4;12;1} // Peak/Trough detection control
{#OptVar2 15;3;30;3} // Sensitivity for matching rectangle peaks/troughs
{#OptVar3 10;0;30;2} // Breakout sensitivity

ChangeScale( #Daily ); // written for daily scale only

{$I 'Rectangles'}
var Bar, p, n: integer;
var breakPrice, stopPr: float;
var R: TRect;
var RectActive: boolean = false;
var enBreakEvenStop: boolean = false;
var PeakTroughPct: float = #OptVar1;
var SensitivityPct: float = #OptVar2 / 10;
var boSensitivityPct: float = #OptVar3 / 10;

{* Initialize the list of rectangles, rectList *}
FindRectangles( PeakTroughPct, SensitivityPct, boSensitivityPct );

{* Access and print some values from the rectangles shown on the chart *}
Print( 'stBar' + #9 + 'idBar' + #9 + 'enBar' + #9 + 'T2');
for n := 0 to rectList.Count - 1 do
begin
R := rectList.Object( n ) as TRect;
Print( IntToStr( R.stBar ) + #9 + IntToStr( R.idBar )
+ #9 + IntToStr( R.enBar ) + #9 + FormatFloat( '0.00', R.T2 ) );
end;

PlotStops;
for Bar := 20 to BarCount - 1 do
begin
if LastPositionActive then
begin
p := LastPosition;
var pePrice: float = PositionEntryPrice( p );
if PositionLong( p ) then
begin
if not enBreakEvenStop then
enBreakEvenStop := PriceHigh( Bar ) >= R.T1;
if enBreakEvenStop then
stopPr := pePrice
else
stopPr := GetPositionRiskStop( p );
if not SellAtStop( Bar + 1, stopPr, p, 'Stop Loss' ) then
SellAtLimit( Bar + 1, R.T2, p, 'T2' );
end
else
begin
if not enBreakEvenStop then
enBreakEvenStop := PriceLow( Bar ) <= R.T1;
if enBreakEvenStop then
stopPr := pePrice
else
stopPr := GetPositionRiskStop( p );
if not CoverAtStop( Bar + 1, stopPr, p, 'Stop Loss' ) then
CoverAtLimit( Bar + 1, R.T2, p, 'T2' );
end;
end
else
begin { Entry logic }
if not RectActive then
begin
enBreakEvenStop := false;
n := rectList.IndexOf( Bar ); // was a rectangle identified on this bar?
if n > -1 then
begin
R := rectList.Object( n ) as TRect;
RectActive := true;
end;
end;
{ breakouts occur on R.enBar }
if RectActive and ( Bar = R.enBar ) then
begin
RectActive := false;
stopPr := ( R.tVal + R.pVal ) / 2;
SetRiskStopLevel( stopPr );
if Bar - R.stBar > 60 then // only trade rectangles that span at least 3 months (daily bars)
if R.breakUp then
begin
BuyAtMarket( Bar + 1, '' );
breakPrice := R.pVal * (1 + boSensitivityPct/100);
end
else
begin
ShortAtMarket( Bar + 1, '' );
breakPrice := R.tVal * (1 - boSensitivityPct/100);
end;
end;
end;
end;
HideVolume
المعادلة شغالة عندي

مشاركة: ابو غيدا والاخوان ممكن مساعدة



قديم 2009-06-27, 01:28
  المشاركه # 5
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
السلام عليكم
اخواني ابي معادله الموشرات التاليه للولث لاب
.. مؤشر .. ( Cum ) .. لبرنامج الولث لاب
اتمنى ان يكون هذا ما اردته

كود

{ CumDown calculation demo }
const L = 5;
var Bar, n: integer;

DrawLabel( 'CumDown(#Low,' + IntToStr( L ) + ')', 0 );
PlotSeriesLabel( OffsetSeries( #Low, -L ), 0, #RED, #Dotted,
'Offset(#Low, -' + IntToStr( L ) + ')');
for Bar := L to BarCount - 1 do
begin
n := Trunc( CumDown( Bar, #Low, L ) );
AnnotateBar( IntToStr( n ), Bar, false, 0, 8 );
end;

{ CumUp calculation demo }

DrawLabel( 'CumUp(#High,' + IntToStr( L ) + ')', 0 );
PlotSeriesLabel( OffsetSeries( #High, -L ), 0, #GREEN, #Dotted,
'Offset(#High, -' + IntToStr( L ) + ')');
for Bar := L to BarCount - 1 do
begin
n := Trunc( CumUp( Bar, #High, L ) );
AnnotateBar( IntToStr( n ), Bar, true, 0, 8 );
end;


مشاركة: ابو غيدا والاخوان ممكن مساعدة


قديم 2009-06-27, 05:14
  المشاركه # 6
عضو هوامير المميز
انضم في: Jan 2007
المشاركات: 189
 

اقتباس:
المشاركة الأصلية كتبت بواسطة M O L Y
المعادلة شغالة عندي

مشاركة: ابو غيدا والاخوان ممكن مساعدة
مولي كثر الله من امثالك
حاولت اشغل المعادله ولاكن عجزت ممكن تنزلي المعادله من عندك مرة الثانيه ولاعليك امر


قديم 2009-06-27, 10:33
  المشاركه # 7
كاتب قدير
انضم في: Jul 2006
المشاركات: 36,145
 

ماقصرتي ام معاذ
مع محللنا الغالي


قديم 2009-06-27, 16:10
  المشاركه # 8
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
مولي كثر الله من امثالك
حاولت اشغل المعادله ولاكن عجزت ممكن تنزلي المعادله من عندك مرة الثانيه ولاعليك امر
المشكلة مو من المعادلة المعادلة صحيحة
الخطا الي يظهر عندك اكيد يتعلق ب {$I 'Rectangles'}
وهذي مشكلة عند الاغلبية
بس ابي اسألك الاصدار الي عندك اي اصدار ؟


قديم 2009-06-27, 16:10
  المشاركه # 9
عضو هوامير المميز
انضم في: Jan 2007
المشاركات: 189
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
مولي كثر الله من امثالك
حاولت اشغل المعادله ولاكن عجزت ممكن تنزلي المعادله من عندك مرة الثانيه ولاعليك امر
ابوغيدا ومولي والاخوان ممكن تنزول المعادله مرة ثانيه علما بأن الاصدار الي عندي القديم 3.0


قديم 2009-06-27, 16:14
  المشاركه # 10
خبيرة الويلث لاب
انضم في: May 2009
المشاركات: 850
 

اقتباس:
المشاركة الأصلية كتبت بواسطة ابوهياء001
ابوغيدا ومولي والاخوان ممكن تنزول المعادله مرة ثانيه علما بأن الاصدار الي عندي القديم 3.0
طيب حمل الرابع وجرب يمكن تشتغل معك وعادي الاصدارين مع بعض ما بيكون بينهم اي تعارض







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

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

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


23:22

⚡ نبض هوامير
جاري تحميل الأخبار...