ارجوكم الدخول بسرعة ... برمجة لكود مؤشر rsi
السلام عليكم و رحمة الله تعالى و بركاته
ارجو من الاخوة الكرام ان يمدو لي يد العون و انا اتصفح موقع مصطفى بلخياط وجدت كود مؤشر rsi التي يستعملها بلخياط
************************************************** ************
input: Price ( Close );
input: Length ( 14 );
Input: Green_Corridor (1);
Input: Red_Corridor (1);
input: OverSold ( 40 );
input: OverSold2 ( 20 );
input: OverBought ( 60 );
input: OverBought2 ( 80 );
input: OverSColor ( Cyan );
input: OverBColor ( Red ) ;
var: MyRSI ( 0 ) ;
MyRSI = RSI( Price, Length ) ;
Plot1( MyRSI, "RSI" ) ;
Plot2( OverBought, "OverBot",red,0,0) ;
Plot3( OverSold, "OverSld",green,0,0 ) ;
Plot4( OverBought2, "OverBot",green,0,0 ) ;
Plot5( OverSold2, "OverSld",red,0,0) ;
{ Color criteria }
if MyRSI > OverBought then
SetPlotColor( 1, OverBColor )
else if MyRSI < OverSold then
SetPlotColor( 1, OverSColor ) ;
{ Alert criteria }
if MyRSI crosses over OverSold then
Alert( "Indicator exiting oversold zone" )
else if MyRSI crosses under OverBought then
Alert( "Indicator exiting overbought zone" ) ;
if Red_Corridor = 1 {and myRSI > OverBought} then begin
plot80(OverBought,"top",rgb(131, 0, 0),0,6);
plot81(OverSold2,"bot");
end;
if Green_Corridor = 1 {and myRSI < OverSold} then begin
plot80(OverBought2,"top",rgb(0, 121, 0),0,6);
plot81(OverSold,"bot");
end;
************************************************** ***********
ارجوكم يا اخواني كيف يمكن تعديل المؤشرrsi لكي تصبح بالاعداد التي يستعملها بلخياط او كيفية صناعة المؤشرات وارفاقها المتاترادر 4
وكدلك وجدت كود مؤشر اخر في موقع بلخياط :
************************************************** *************
Title: _ggTimeChannels ()
*******************************************
Date Programmer Ref Description
07-29-2007 A BRUNO Time channels to determine ranges by time
04-21-2009 A BRUNO Converted to ATZ format or 48 zones
10-22-2009 A BRUNO compare 4 datas by time zone 1,2,3,4,5,6,8,10,12,15,20,30,60
BUILT FOR EXCHANGE TIME ONLY
Last Update: 10-22-2009 10:39
*******************************************}
{the ideal indicateur would have a input Variable
allowing one to define the start time corridor and its end time
for example between 9h30 to 10h30
and i can change manually to check all the time corridors ,
another input could be the ATR, Volume, HPI }
{ this indicator averages the collection data over an extended period
Change this input
Input: UseFormula_12345 (?);
2. {Range}
3. {Longest Ray from Open or Close[1]}
1. {ATR}
4. {tick or Volume total}
5. {tick or Volume difference}
}
Input: UseFormula_12345 (2);
Input: Number_of_Datas (1);
Input: Plot_Size (1);
Input: __ (.);
Input: Formula_1_ATR (.);
Input: Formula_2_Range (.);
Input: Formula_3_Ray (.);
Input: Formula_4_tickTotal (.);
Input: Formula_5_tickDifference(.);
{input: EURUSD_Green (1);
input: GBPJPY_DarkGreen (1);
input: EURGBP_DarkRed (1);
input: USDJPY_Red (1);}
Var: IM(Text);IM = ("ATZ_TimeC," +numtostr(d,0)+ ", "+numtostr(t,0)+","+GetSymbolName+":"+numtostr(Bar interval,0)+", ");
Var: IM2(Text);IM2 = ("ATZ_TimeC," +numtostr(d,0)+ ", "+numtostr(t,0)+", ");
var: ATZ(0);
var: f#(0);
Array: intrabarpersist rng [4,2401,10] (0); {collection of raw values}
Array: intrabarpersist sym [4,89,10] (0); {all symbol data}
var: index (0); {circular array marker}
var: Tindex (0); {time index marker}
Var: dat# (0); {Data stream number}
Var: symbolMax (0); {set high for max number of symbols}
var: SymFldmax (10); {max field in circular array}
var: lbmax (89); {lookback max field in circular array}
{Input to var pass}
f# = UseFormula_12345;
symbolmax = Number_of_Datas;
Array: ptx[4](0);
var: pt(0), bpv(0), _FX(0), PS(0), bp(0);
if currentbar = 1 then begin
PS = pricescale;
BP = bigpointvalue;
pt = minmove/pricescale;{Determine smallest price increment i.e 1/10 or .25 }
bpv = minmove/pricescale * bigpointvalue;
for Dat# = 1 to symbolmax begin
ptx[dat#] = (minmove/pricescale)data(dat#);
end;
end;{Currentbar = 1}
var: color (0);
var: ArrayTMax (0);
if CurrentBar = 1 then begin
Array: TimeC[2400,2] (0);
Var: FldTMAX(0),barInt(0);
Barint = barinterval;
{Build array with select synthetic minutes}
ArrayTMax = _ggTimeArray_Fn(TimeC,Barint,0,2401); {populate time array }
FldTMAX = ((60 /Barint) * 24);
end; {of currentbar = 1}
array: Zone[2401,5](0);
Var: intrabarpersist ATR (0);
Var: intrabarpersist ATR1 (0);
Var: intrabarpersist ATR2 (0);
Var: intrabarpersist ATR3 (0);
Var: intrabarpersist ATR4 (0);
Var: intrabarpersist ATR5 (0);
var: c_News (0);
var: z (0);
var: Switch_on (true);
var: ATZZ (0);
var: ATZZ2 (0);
c_News = 0;
{ATR Calculation~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }
array: p[3,10] (0);
var: x(0);
{convert to US Dollars}
If barstatus(1) = 2 OR barstatus(1) = 1 then begin
for dat# = 1 to symbolMax begin
if dat# = 1 then begin {for circular arrays}
index = index + 1;
if index > lbMax then index = 1;
end;
If BarStatus(dat#) = 2 then begin
sym[dat#,index,1] = profitCF Data(dat#)* 100000; {FX profitCF ALL DATA's each bar}
end else begin
break;
End;
end;
End;
{Get all data from symbols}
If barstatus(1) = 2 or barstatus(1)= 2 then begin
{sync Time}
for z = 1 to FldTMax begin
if z= 1 and T = timeC[tindex+1 ,1] then begin
Tindex = Tindex+1; break;
end;
if T = timeC[Z,1] then begin
Tindex = z; break;
end;
end;
for dat# = 1 to symbolMax begin
sym[dat#,index,2] =(D) Data(dat#);
sym[dat#,index,3] =(T) Data(dat#);
sym[dat#,index,4] =(O) Data(dat#);
sym[dat#,index,5] =(H) Data(dat#);
sym[dat#,index,6] =(L) Data(dat#);
sym[dat#,index,7] =(C) Data(dat#);
sym[dat#,index,8] =(upticks) Data(dat#);
sym[dat#,index,9] =(downticks) Data(dat#);
{ATR1 = maxlist (H-L, H-c[1], c[1]-L) *Fib_Factor; {ATR}
ATR2 = absvalue(C-O) *Fib_Factor; {Range}
ATR3 = maxlist (absvalue(O-L),H-O, H-c[1], c[1]-L) *Fib_Factor; {Longest Ray from Open or Close[1]}
ATR4 = (upticks+ downticks); {tick or Volume total}
ATR5 = absvalue(upticks-downticks); {tick or Volume difference}}
{Standard}
ATR1 = maxlist(sym[dat#,index,5]-sym[dat#,index,6],sym[dat#,index,5]-sym[dat#,index,6][1], sym[dat#,index,6][1]-sym[dat#,index,6]);
ATR2 = absvalue(sym[dat#,index,7]-sym[dat#,index,4]);
ATR3 = maxlist(absvalue(sym[dat#,index,7]-sym[dat#,index,6]),sym[dat#,index,5]-sym[dat#,index,7], sym[dat#,index,5]-sym[dat#,index,6][1], sym[dat#,index,6][1]-sym[dat#,index,6]);
ATR4 = (sym[dat#,index,8] + sym[dat#,index,9]);
ATR5 = absvalue(sym[dat#,index,8] - sym[dat#,index,9]);
rng[dat#,Tindex,1] = rng[dat#,Tindex,1] + ATR1; {ATR}
rng[dat#,Tindex,2] = rng[dat#,Tindex,2] + ATR2; {Range}
rng[dat#,Tindex,3] = rng[dat#,Tindex,3] + ATR3; {Longest Ray from Open or Close[1]}
rng[dat#,Tindex,4] = rng[dat#,Tindex,4] + ATR4; {tick or Volume total}
rng[dat#,Tindex,5] = rng[dat#,Tindex,5] + ATR5; {tick or Volume difference}
rng[dat#,Tindex,6] = rng[dat#,Tindex,6] + 1; {counter for division}
end;{Dat#}
for Dat# = 1 to symbolMax begin
if F# = 1 then begin
if dat# = 1 then Plot30( (rng[1,Tindex,f#]/rng[1,Tindex,6])/ptx[1] ,"data1",Green, 0,Plot_Size);
if dat# = 2 then Plot31( (rng[2,Tindex,f#]/rng[2,Tindex,6])/ptx[2] ,"data2",DarkGreen,0,Plot_Size);
if dat# = 3 then Plot32( (rng[3,Tindex,f#]/rng[3,Tindex,6])/ptx[3] ,"data3",Red, 0,Plot_Size);
if dat# = 4 then Plot33( (rng[4,Tindex,f#]/rng[4,Tindex,6])/ptx[4] ,"data4",DarkRed, 0,Plot_Size);
end;
if F# = 2 then begin
if dat# = 1 then Plot30( (rng[1,Tindex,f#]/rng[1,Tindex,6])/ptx[1] ,"data1",Green, 0,Plot_Size);
if dat# = 2 then Plot31( (rng[2,Tindex,f#]/rng[2,Tindex,6])/ptx[2] ,"data2",DarkGreen,0,Plot_Size);
if dat# = 3 then Plot32( (rng[3,Tindex,f#]/rng[3,Tindex,6])/ptx[3] ,"data3",Red, 0,Plot_Size);
if dat# = 4 then Plot33( (rng[4,Tindex,f#]/rng[4,Tindex,6])/ptx[4] ,"data4",DarkRed, 0,Plot_Size);
end;
if F# = 3 then begin
if dat# = 1 then Plot30( (rng[1,Tindex,f#]/rng[1,Tindex,6])/ptx[1] ,"data1",Green, 0,Plot_Size);
if dat# = 2 then Plot31( (rng[2,Tindex,f#]/rng[2,Tindex,6])/ptx[2] ,"data2",DarkGreen,0,Plot_Size);
if dat# = 3 then Plot32( (rng[3,Tindex,f#]/rng[3,Tindex,6])/ptx[3] ,"data3",Red, 0,Plot_Size);
if dat# = 4 then Plot33( (rng[4,Tindex,f#]/rng[4,Tindex,6])/ptx[4] ,"data4",DarkRed, 0,Plot_Size);
end;
if F# = 4 then begin
if dat# = 1 then Plot30( (rng[1,Tindex,f#]/rng[1,Tindex,6]) ,"data1",Green, 0,Plot_Size);
if dat# = 2 then Plot31( (rng[2,Tindex,f#]/rng[2,Tindex,6]) ,"data2",DarkGreen,0,Plot_Size);
if dat# = 3 then Plot32( (rng[3,Tindex,f#]/rng[3,Tindex,6]) ,"data3",Red, 0,Plot_Size);
if dat# = 4 then Plot33( (rng[4,Tindex,f#]/rng[4,Tindex,6]) ,"data4",DarkRed, 0,Plot_Size);
end;
if F# = 5 then begin
if dat# = 1 then Plot30( (rng[1,Tindex,f#]/rng[1,Tindex,6]) ,"data1",Green, 0,Plot_Size);
if dat# = 2 then Plot31( (rng[2,Tindex,f#]/rng[2,Tindex,6]) ,"data2",DarkGreen,0,Plot_Size);
if dat# = 3 then Plot32( (rng[3,Tindex,f#]/rng[3,Tindex,6]) ,"data3",Red, 0,Plot_Size);
if dat# = 4 then Plot33( (rng[4,Tindex,f#]/rng[4,Tindex,6]) ,"data4",DarkRed, 0,Plot_Size);
end;
end;
end;{barstatus}
plot99(0,"0",darkbrown,0,0);
************************************************** ***************
ارجوكم يا اخواني كيف يمكن صناعة مؤشر بهدا الكود و ارفاقها في المتاتريد
والله لا يضيع اجر المحسنين
رد: ارجوكم الدخول بسرعة ... برمجة لكود مؤشر rsi
ماوعدك بشي
بس ان شاء الله اقدر استوعبه واحوله لصيغه mql4 في اجازه السوق
تقبل تقديري
رد: ارجوكم الدخول بسرعة ... برمجة لكود مؤشر rsi
اقتباس:
المشاركة الأصلية كتبت بواسطة 101
ماوعدك بشي
بس ان شاء الله اقدر استوعبه واحوله لصيغه mql4 في اجازه السوق
تقبل تقديري
شكرا اخي الكريم و جعلها الله في ميزان حسناتك
رد: ارجوكم الدخول بسرعة ... برمجة لكود مؤشر rsi
اقتباس:
المشاركة الأصلية كتبت بواسطة azize
شكرا اخي الكريم و جعلها الله في ميزان حسناتك
السلام عليكم
اخوي المؤشر عباره عن موشر ار اس اي عادي ولكن به اربع مستويات
اثنان اوفر سيل واثنين اوفر باي
20
40
60
80
اعداداته 14