توصية شراءءء Eres 13.35

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
(2)ترند فلتر


Var Bar,C,C1,C2,C3,S,S1,S2: integer;
Var useWeekly: boolean;

HideVolume;

// Set TRUE to restore weekly mode
useWeekly := false;

if useWeekly then
begin
SetScaleWeekly;

C := DailyFromWeekly ( #Close );
S := DailyFromWeekly( SmaSeries( #Close, 39 ) );

SetPrimarySeries( '^DJI' );
C1 := DailyFromWeekly ( #Close );
S1 := DailyFromWeekly( SmaSeries( #Close, 39 ) );

SetPrimarySeries( '^DJU' );
C2 := DailyFromWeekly ( #Close );
S2 := DailyFromWeekly( SmaSeries( #Close, 39 ) );

RestorePrimarySeries;
end
else
begin
C := #Close;
S := SmaSeries( #Close, 39*5 );

SetPrimarySeries( '^DJI' );
C1 := #Close;
S1 := SmaSeries( #Close, 39*5 );

SetPrimarySeries( '^DJU' );
C2 := #Close;
S2 := SmaSeries( #Close, 39*5 );

RestorePrimarySeries;
end;

SynchAll;

for Bar := 39*5 to BarCount - 1 do
begin

//Buy filter
if MarketPosition <> 1 then
begin
if (GetSeriesValue(Bar, C) > GetSeriesValue(Bar, S)) then
if ((GetSeriesValue( Bar, c1) > GetSeriesValue(Bar, S1)) or
(GetSeriesValue( Bar, c2) > GetSeriesValue(Bar, S2))) then
begin
SetBackgroundColor( Bar, #BlueBkg );
if MarketPosition = -1 then CoverAtMarket( Bar+1, LastPosition, '' );
BuyAtMarket( Bar+1, '' );
end;
end;


//Short filter
if MarketPosition <> -1 then
begin
if (GetSeriesValue(Bar, C) < GetSeriesValue(Bar, S)) then
if ((GetSeriesValue( Bar, c1) < GetSeriesValue(Bar, S1)) or
(GetSeriesValue( Bar, c2) < GetSeriesValue(Bar, S2))) then
begin
SetBackgroundColor( Bar, #RedBkg );
if MarketPosition = 1 then SellAtMarket( Bar+1, LastPosition, '' );
ShortAtMarket( Bar+1, '' );
end;
end;

end;

PlotSeries( S, 0, #Gray, #Thick );

var Pane1: integer;
Pane1 := CreatePane( 75, true, true );
PlotSeries( c1, Pane1, #Blue, #Thin );
PlotSeries( s1, Pane1, #Red, #Thin );
DrawLabel( 'DOW 30', Pane1 );

var Pane2: integer;
Pane2 := CreatePane( 75, true, true );
PlotSeries( c2, Pane2, #Blue, #Thin );
PlotSeries( s2, Pane2, #Red, #Thin );
DrawLabel( 'DOW 15 UTILITIES', Pane2 );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
هذا الفلتر يعطيك كم عدد الاسهم الى فوق 200 يوم


var j, w, bar : integer;
bar := BarCount-1;

for w := 0 to WatchListCount - 1 do
begin
SetPrimarySeries( WatchListSymbol( w ) );
if @#Close[bar] > SMA( bar, #Close, 200 ) then Inc( j );
end;
var t : string = FormatFloat( '0.00', (j/w)*100 )
+ '% of the stocks are above their 200 DMA';

//Your choice:
Print( t );
AddCommentary ( t );
ShowMessage ( t );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
vol+pattern عدد 2


(1)




{
buy/sell stop (yesterdays high or low)
after an inside day if the 6/100 vol is smaller than 0.50.
Stop: previous day low or high.
plus an trailing stop(70%Profit).
}

var P, Bar : integer;

for Bar := 1 to BarCount-1 do
begin

if MarketPosition = 0 then
if @#High[Bar-1]>@#High[Bar] then
if @#Low[Bar-1]<@#Low[Bar] then
if @#Volume[Bar]*6/100 < 0.5 then
BuyAtMarket( Bar+1, 'Inside Day - Low Vol' );

P := LastPosition;

if MarketPosition = 1 then
if not SellAtTrailingStop( Bar+1,
PositionEntryPrice( P )*1.7, P, '70% Profit Trailing Stop' ) then
if not SellAtStop( Bar+1, @#Low[Bar-1], P, 'Previous Day Low' ) then
SellAtStop( Bar+1, @#High[Bar-1], P, 'Previous Day High' );

end;
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
vol+pattern

(2)

{
Buy:
1. Yesterday was an inside day.
2. HV of the last 6 days is 1/2 of the 100 day HV.
3. Buy if today's price is ever above yesterday high

Sell:
1. Sell if today's price is ever under yesterday low.
}

var Bar : integer;

for Bar := 2 to BarCount-1 do
begin

if MarketPosition = 0 then
if @#High[Bar-2]>@#High[Bar-1] then
if @#Low[Bar-2]<@#Low[Bar-1] then
if HV( Bar-1, #Close, 6, 252 )<= HV( Bar-1, #Close, 100, 252 )*0.5 then
BuyAtStop( Bar, @#High[Bar-1], '' );

if MarketPosition = 1 then
SellAtStop( Bar, @#Low[Bar-1], LastPosition, '' );

end;



trading Alerts ملف


{
Buy:
1. Today was an inside day.
2. HV of the last 6 days is 1/2 of the today's 100 day HV.
3. Buy if tomorrow's price is ever above today's high

Sell:
1. Sell if tomorrow's price is ever under today's low.
}

var Bar : integer;

for Bar := 1 to BarCount-1 do
begin

if MarketPosition = 0 then
if @#High[Bar-1]>@#High[Bar-0] then
if @#Low[Bar-1]<@#Low[Bar-0] then
if HV( Bar, #Close, 6, 252 )<= HV( Bar, #Close, 100, 252 )*0.5 then
BuyAtStop( Bar+1, @#High[Bar], '' );

if MarketPosition = 1 then
SellAtStop( Bar+1, @#Low[Bar], LastPosition, '' );

end;
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
Lowest low X days made within X days فايلين

(1)

if(
((@#Close[Bar]<=Lowest(Bar,#Close,50)) and
(@#Close[Bar]>=Lowest(Bar,#Close,200)))
then
BuyAtMarket(Bar+1,'');


(2)


if(
((@#Close[Bar]<=Lowest(Bar,#Close,5)) OR
((@#Close[Bar-1]<=Lowest(Bar,#Close,5)) OR
((@#Close[Bar-2]<=Lowest(Bar,#Close,5)) OR
((@#Close[Bar-3]<=Lowest(Bar,#Close,5)) OR
((@#Close[Bar-4]<=Lowest(Bar,#Close,5))
then
BuyAtMarket(Bar+1,'');
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
Highest High since Entry خمسة فايلات


(1)


for Bar := 20 to BarCount - 1 do
begin
//...
if LastPositionActive=false then begin
// ...
end else begin
lookDays:=1 + Bar - PositionEntryBar(LastPosition);
SetSeriesValue(Bar, tempHigh, Highest(Bar, #High, trunc(max(lookDays,1))));
PlotSeries( tempHigh, 0, #green, #thick );
end;
end;




(2)



lookDays:=1 + Bar - PositionEntryBar(LastPosition);
SetSeriesValue(Bar, tempHigh, Highest(Bar, #High, 10));




(3)



SetSeriesValue(Bar, tempHigh, Highest(Bar, #High, trunc(max(lookDays,1))));



(4)


var Bar, p: integer;
var HH: float;

PlotStops;
for Bar := 20 to BarCount - 1 do
begin

if not LastPositionActive then
begin
{ Arbitrary entry - every 50 bars }
if Bar Mod 50 = 0 then
begin
BuyAtMarket( Bar + 1, '' );
HH := PriceHigh( Bar ); // init HH on entry
end;
end
else // Exit logic
begin
{ Update the highest high (HH) }
HH := Max( HH, PriceHigh( Bar ) );
p := LastPosition;
{ Sell at the highest high, plus a quarter point }
SellAtLimit( Bar + 1, HH + 0.25, p, '' );
end;
end;


(5)


for Bar := 20 to BarCount - 1 do
begin
if not LastPositionActive then
begin
{ Entry Rules }
// ...
end
else
begin
lookDays := 1 + Bar - PositionEntryBar(LastPosition);
currHighest := Highest(Bar, #High, trunc(Max(lookDays, 1))); // float to store highest value
currLowest := Lowest(Bar, #Low, trunc(Max(lookDays, 1))); // float to store lowest value
{ Exit Rules }
// ...
end;
SetSeriesValue(Bar, tempHigh, currHighest);
SetSeriesValue(Bar, tempLow, currLowest);
end;

// EnableTradeNotes( false, true, true ); // uncomment to suppress buy and sell text labels
PlotSeries(tempHigh, 0, #green, #thin );
PlotSeries(tempLow, 0, #red, #thin );
 

SAIFY

عضو نشط
التسجيل
4 أغسطس 2004
المشاركات
342
السلام و عليكم
اخي انا اقول لك ما يشتغل عندي
copy and paste
او انا مو فاهم طريقة نقل الكود في
في برنامج wealth lab
لو تكرمت ترفق ملف اللي به فلتر
او اشرح لنا طريقة تنزيل فلتر في الملف
معليش بتعبك معي

جداد على برنامج

معليش يا خي

مشكوررررررررررررررررررررررررررررررر
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
ثلاثة فايلات stock 3 days down

(1)

var Bar,i,k:integer;
var limit:float;


for Bar:=3 to BarCount -1 do
begin


k:=0;
for i:=Bar-2 to Bar do
if ( PriceClose(i-1)>PriceClose(i) )
and
( PriceLow(i-1)>PriceLow(i) )
then
k:=k+1;

if (k=3)
and
(PriceOpen(Bar)>PriceClose(Bar)) //price fell today
then begin
BuyAtClose(Bar,'');
SellAtLimit(Bar+1,PriceAverageC(Bar),LastPosition,'');
SellAtClose(Bar+1,LastPosition,'');
end;

end;


(2)


var Bar,i,k:integer;

k:= 0;
for Bar:=4 to BarCount -1 do
begin
if (PriceClose(Bar - 3) < PriceClose(Bar - 2)) and
(PriceClose(Bar - 2) < PriceClose(Bar - 1)) and
(PriceClose(Bar - 1) < PriceClose(Bar)) then
k := 3
else
k := 0;

if LastPositionActive then
if not SellAtLimit(Bar+1,PriceAverageC(Bar),LastPosition,'') then
SellAtClose(Bar+1,LastPosition,'')

else
if (k=3) and (PriceOpen(Bar) > PriceClose(Bar))
then
BuyAtClose(Bar,'');

end;



(3)


var Bar:integer;
var Is3Down: boolean;

for Bar:=4 to BarCount -1 do
begin
Is3Down := (PriceClose(Bar - 3) < PriceClose(Bar - 2)) and
(PriceClose(Bar - 2) < PriceClose(Bar - 1)) and
(PriceClose(Bar - 1) < PriceClose(Bar));

if LastPositionActive then
begin
if not SellAtLimit(Bar+1,PriceAverageC(Bar),LastPosition,'') then
SellAtClose(Bar+1,LastPosition,'');
end
else if Is3Down and ( PriceOpen( Bar ) > PriceClose( Bar ) ) then
BuyAtClose(Bar,'');

end;
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
فلتر الخروج من السهم خلال اسبوعين عدد 2


(1)



InstallTimeBasedExit (10);
.
.
.
ApplyAutoStops (bar +1)



(2)


var Bar, SMA20 : integer;
SMA20 := SMASeries( #Close, 20 );

InstallTimeBasedExit( 10 );
for Bar := 21 to BarCount-1 do
begin
ApplyAutoStops( Bar );
if CrossUnder( Bar, #Close, SMA20 ) then
BuyAtMarket( Bar+1, '' );
end;
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
خمسة فلاتر للماكد اليومى والاسبوعى


(1)


var Bar, WeeklyMACD, WeeklyMACDSignal : integer;
var DailyMACD, DailyMACDSignal : integer;

SetScaleWeekly;
WeeklyMACD := MACDSeries( #Close );
WeeklyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );
RestorePrimarySeries;
WeeklyMACD := DailyFromWeekly( WeeklyMACD );
WeeklyMACDSignal := DailyFromWeekly( WeeklyMACDSignal );
DailyMACD := MACDSeries( #CLose );
DailyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );

for Bar := 90 to BarCount-1 do
begin

//Buy Rules
if ( MarketPosition = 0 )
and ( CrossOverValue( Bar, WeeklyMACDSignal, @WeeklyMACD[Bar] ) )
and ( CrossOverValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
BuyAtClose( Bar+1, '' );

//Example Sell Rules
if ( MarketPosition = 1 )
and ( CrossUnderValue( Bar, WeeklyMACDSignal, @WeeklyMACD[Bar] ) )
or ( CrossUnderValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
SellAtClose( Bar+1, LastPosition, '' );

end;

var P1, P2 : integer;
P1 := CreatePane( 200, true, true );
P2 := CreatePane( 200, true, true );
PlotSeries( WeeklyMACD, P1, #blue, #thin );
PlotSeries( WeeklyMACDSignal, P1, #red, #thin );
PlotSeries( DailyMACD, P2, #green, #thin );
PlotSeries( DailyMACDSignal, P2, #red, #thin );




(2)


var Bar, WeeklyMACD, WeeklyMACDSignal : integer;
var DailyMACD, DailyMACDSignal : integer;

SetScaleWeekly;
WeeklyMACD := MACDSeries( #Close );
WeeklyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );
RestorePrimarySeries;
WeeklyMACD := DailyFromWeekly( WeeklyMACD );
WeeklyMACDSignal := DailyFromWeekly( WeeklyMACDSignal );
DailyMACD := MACDSeries( #CLose );
DailyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );

for Bar := 90 to BarCount-1 do
begin

//Buy Rules
if ( MarketPosition = 0 )
and ( CrossOverValue( Bar, WeeklyMACDSignal, @WeeklyMACD[Bar] ) )
and ( CrossOverValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
BuyAtClose( Bar+1, '' );

//Example Sell Rules
if ( MarketPosition = 1 )
and ( CrossUnderValue( Bar, WeeklyMACDSignal, @WeeklyMACD[Bar] ) )
or ( CrossUnderValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
SellAtClose( Bar+1, LastPosition, '' );

end;

var P1, P2 : integer;
P1 := CreatePane( 200, true, true );
P2 := CreatePane( 200, true, true );
PlotSeries( WeeklyMACD, P1, #blue, #thin );
PlotSeries( WeeklyMACDSignal, P1, #red, #thin );
PlotSeries( DailyMACD, P2, #green, #thin );
PlotSeries( DailyMACDSignal, P2, #red, #thin );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
(3)


var Bar, WeeklyMACD, WeeklyMACDSignal : integer;
var DailyMACD, DailyMACDSignal : integer;

SetScaleWeekly;
WeeklyMACD := MACDSeries( #Close );
WeeklyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );
RestorePrimarySeries;
WeeklyMACD := DailyFromWeekly( WeeklyMACD );
WeeklyMACDSignal := DailyFromWeekly( WeeklyMACDSignal );
DailyMACD := MACDSeries( #CLose );
DailyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );

for Bar := 90 to BarCount-1 do
begin
//Buy Rules
if ( MarketPosition = 0 )
and ( @WeeklyMACD[Bar] > @WeeklyMACDSignal[Bar] )



and ( CrossOverValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
BuyAtClose( Bar+1, '' );

//Example Sell Rules
if ( MarketPosition = 1 )
and ( @WeeklyMACD[Bar] < @WeeklyMACDSignal[Bar] )



or ( CrossUnderValue( Bar, DailyMACDSignal, @DailyMACD[Bar] ) ) then
SellAtClose( Bar+1, LastPosition, '' );



end;

var P1, P2 : integer;
P1 := CreatePane( 200, true, true );
P2 := CreatePane( 200, true, true );
PlotSeries( WeeklyMACD, P1, #blue, #thin );
PlotSeries( WeeklyMACDSignal, P1, #red, #thin );
PlotSeries( DailyMACD, P2, #green, #thin );
PlotSeries( DailyMACDSignal, P2, #red, #thin );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
(4)


var WBar, Bar, WeeklyMACD, WeeklyMACDSignal : integer;
var DailyMACD, DailyMACDSignal : integer;

SetScaleWeekly;
WeeklyMACD := MACDSeries( #Close );
WeeklyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );
RestorePrimarySeries;
WeeklyMACD := DailyFromWeekly( WeeklyMACD );
WeeklyMACDSignal := DailyFromWeekly( WeeklyMACDSignal );
DailyMACD := MACDSeries( #Close );
DailyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );

for Bar := 90 to BarCount-1 do
begin

WBar := GetWeeklyBar( Bar );

//Buy Rules
if ( MarketPosition = 0 )
and ( @WeeklyMACD[WBar] < @WeeklyMACDSignal[WBar] )
and ( CrossOver( Bar, DailyMACDSignal, DailyMACD ) ) then
BuyAtClose( Bar+1, '' );

//Example Sell Rules
if ( MarketPosition = 1 )
and ( CrossUnder( WBar, WeeklyMACDSignal, WeeklyMACD ) )
or ( CrossUnder( Bar, DailyMACDSignal, DailyMACD ) ) then
SellAtClose( Bar+1, LastPosition, '' );

end;

var P1, P2 : integer;
P1 := CreatePane( 200, true, true );
P2 := CreatePane( 200, true, true );
PlotSeries( WeeklyMACD, P1, #blue, #thin );
PlotSeries( WeeklyMACDSignal, P1, #red, #thin );
PlotSeries( DailyMACD, P2, #green, #thin );
PlotSeries( DailyMACDSignal, P2, #red, #thin );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
(5)


var WBar, Bar, WeeklyMACD, WeeklyMACDSignal : integer;
var DailyMACD, DailyMACDSignal : integer;

SetScaleWeekly;
WeeklyMACD := MACDSeries( #Close );
WeeklyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );
RestorePrimarySeries;
WeeklyMACD := DailyFromWeekly( WeeklyMACD );
WeeklyMACDSignal := DailyFromWeekly( WeeklyMACDSignal );
DailyMACD := MACDSeries( #Close );
DailyMACDSignal := EMASeries( MACDSeries( #Close ), 9 );

for Bar := 90 to BarCount-1 do
begin

WBar := GetWeeklyBar( Bar );

//Buy Rules
if ( MarketPosition = 0 )
and ( @WeeklyMACD[WBar] > @WeeklyMACDSignal[WBar] )
and ( CrossOver( Bar, DailyMACD , DailyMACDSignal ) ) then
BuyAtClose( Bar+1, '' );

//Example Sell Rules
if ( MarketPosition = 1 )
and ( CrossUnder( WBar, WeeklyMACDSignal, WeeklyMACD ) )
or ( CrossUnder( Bar, DailyMACD, DailyMACDSignal ) ) then
SellAtClose( Bar+1, LastPosition, '' );

end;

var P1, P2 : integer;
P1 := CreatePane( 200, true, true );
P2 := CreatePane( 200, true, true );
PlotSeries( WeeklyMACD, P1, #blue, #thin );
PlotSeries( WeeklyMACDSignal, P1, #red, #thin );
PlotSeries( DailyMACD, P2, #green, #thin );
PlotSeries( DailyMACDSignal, P2, #red, #thin );
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
average price High

(1)

var Bar: integer;
var d_hoch : float;


D_hoch := (PriceHigh (bar - 1)+
PriceHigh (bar - 2)+
PriceHigh (bar-3))
/3;


for Bar := 20 to BarCount - 1 do
begin
if LastPositionActive
then
begin
ApplyAutoStops (Bar);
end;

If (PriceClose(bar)) > D_hoch
then begin

BuyatStop(bar +1, PriceHigh(bar),'');
SetBackgroundColor(Bar + 1, #greenBkg)
end;



end;



(2)


var Bar, d_hoch : integer;

d_hoch := DivideSeriesValue( SumSeries( #High, 3 ), 3 );

//Example only here
InstallStopLoss( 10.0 );

for Bar := 3 to BarCount-1 do
begin

ApplyAutoStops( Bar );

if PriceClose( Bar ) > @D_hoch[Bar] then
begin
BuyatStop(Bar+1, PriceHigh( bar ), '' );
SetBackgroundColor( Bar, #greenBkg );
end;

end;



(3)


var Bar, d_hoch : integer;

d_hoch := DivideSeriesValue( SumSeries( OffsetSeries( #High, -1 ), 3 ), 3 );

//Example only here
InstallStopLoss( 10.0 );

for Bar := 3 to BarCount-1 do
begin

ApplyAutoStops( Bar );

if PriceClose( Bar ) > @d_hoch[Bar] then
begin
BuyatStop(Bar+1, PriceHigh( Bar ), '' );
SetBackgroundColor( Bar, #greenBkg );
end;

end;
 

ksa2005

عضو نشط
التسجيل
24 سبتمبر 2004
المشاركات
328
weekly chart buy signal




for Bar := 5 to BarCount - 1 do
begin
if ( not LastPositionActive ) then
begin
if CumUp( Bar, #Close, 1 ) >= 5 then
begin
ShortAtClose( Bar + 1, 'sell' );
SetBarColor( Bar, #red );
end;
end
else
begin
CoverAtClose( Bar + 1, LastPosition, 'buy' );
SetBarColor( Bar, #green );
end;
end;

 

SAIFY

عضو نشط
التسجيل
4 أغسطس 2004
المشاركات
342
SAIFY قال:
السلام و عليكم
اخي انا اقول لك ما يشتغل عندي
copy and paste
او انا مو فاهم طريقة نقل الكود في
في برنامج wealth lab
لو تكرمت ترفق ملف اللي به فلتر
او اشرح لنا طريقة تنزيل فلتر في الملف
معليش بتعبك معي

جداد على برنامج

معليش يا خي

مشكوررررررررررررررررررررررررررررررر

يبارك الله فيك

منتظر ردك
اقصد ملفات فلاتر
 

SAIFY

عضو نشط
التسجيل
4 أغسطس 2004
المشاركات
342
SAIFY قال:
يبارك الله فيك

منتظر ردك
اقصد ملفات فلاتر

السلام و عليكم اخي ksa2005
اعتذر على تقرار نفس الموضوع
لان لا استطيع ادخال فارمولا لذلك ارجو ان ترفق ملف
كامل ل فلاتر و لك جزيل الشكر

لو احد عارف طريقة ادخال فلتر ببرنامج wealth lab
لطفا يشرح لنا طريقة انزال الفلتر

وشكرا
 
أعلى