هل يوجد دروس على برمجة المؤشرات اوالتعامل معها
Printable View
هل يوجد دروس على برمجة المؤشرات اوالتعامل معها
سلام الله عليكم ،
كيف الحال إخوان ؟؟؟
أنا للتو انتهيت من قراءة لغة mql4 باللغة الفرنسية ، للاسف المراجع قليلة و حاليا أتدرب عليها لصياغة اكسبيرتات ،
عندي سؤال :
مثال ان أردت برمجة أوردر أو دالة بسيطة جدا ، مضمونها :
ان صعد السعر ب 50 نقطة ( مثلا ) تفعيل OrderSend ،
كيف أعبر عنها بلغة mql4 ؟؟؟
مشكووور مسبقا و ربي يجازيكم على كل مجهوداتكم
سلام الله عليكم ،
كيف الحال إخوان ؟؟؟
كيف حال المتداولين المبرمجين :)
انتهيت للتو من قراءة مرجع بالفرنسية عن لغة mql4 ، للاسف المعلومات قليلة و المراجع قليلة ،
حاليا اتدرب على صياغة كودات و دوال خاصة بهاذ اللغة ،
عندي سؤال ان كان ممكن :
(( ان صعد السعر ب 30 نقطة مثلا ، يتفعل أوردر OrderSend خاص بالشراء ))
كيف نعبر عن هذه العبارة الشرطية في لغة mql4 ؟؟؟؟
الشكر مسبوق و ربي يجازيكم كل خير على كل جهد تبذلوه لخدمة المتداولين
السلام عليكم ورحمة الله تعالى وبركاته
اولا اخي فكرة هذه الدالة هي واضحة ولقد حصلت عليها من منتدى الجيران الاستاذ حسن ولكني اضفت عليها بحيث عندما تتعدى الصفقات من نوع واحد فوق 4 صفقات تعديل الستوب لوز الجماعي ليس متوسط دخول الصفقات وانما على حسب الفيبوناتشي الذي انا حددته
كود:if(Orderscnt(OP_BUY)>1)AvTakeProfit(OP_BUY);if(Orderscnt(OP_SELL)>1)AvTakeProfit(OP_SELL);
ثانياكود:void AvTakeProfit(int type) {
double SLS=Av_Prices(OP_SELL);
double SLB=Av_Prices(OP_BUY);
double TPS=Av_Prices(OP_SELL);
double TPB=Av_Prices(OP_BUY);
for(int cnt=0;cnt<OrdersTotal();cnt++)
{
bool s=OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
double sl=OrderStopLoss(),
tp=OrderTakeProfit(),
op=OrderOpenPrice();
int tk=OrderTicket();
if(OrderSymbol()==Symbol()&&OrderMagicNumber()==magic_number&&OrderType()==type)
{
if(OrderType()==OP_BUY)
{
if(NormalizeDouble(sl,Digits)!=NormalizeDouble(SLB,Digits)&&Bid>SLB)bool m2=OrderModify(tk,op,SLB,tp,0,Red);//closeOrders_sell();
if(NormalizeDouble(tp,Digits)!=NormalizeDouble(TPB,Digits)&&Bid<TPB) m2=OrderModify(tk,op,sl,TPB,0,Red);//closeOrders_sell();
}
if(OrderType()==OP_SELL)
{
if(NormalizeDouble(sl,Digits)!=NormalizeDouble(SLS,Digits)&&Ask<SLS)bool m1=OrderModify(tk,op,SLS,tp,0,Blue);//closeOrders_buy();
if(NormalizeDouble(tp,Digits)!=NormalizeDouble(TPS,Digits)&&Ask>TPS) m1=OrderModify(tk,op,sl,TPS,0,Blue);//closeOrders_buy();
}
}
}
}
double Av_Prices(int type)
{
double fibouloss2=fibouloss-5,fibouloss3=fibouloss-7,fibouloss4=fibouloss-10,fibouloss5=fibouloss-20;
double fibouprofit2=fibouprofit-5,fibouprofit3=fibouprofit-7,fibouprofit4=fibouprofit-10,fibouprofit5=fibouprofit-20;
double Price;
for(int i=0;i<=OrdersTotal();i++)
{
bool s=OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol()&&OrderMagicNumber()==magic_number)
{
if(OrderType()==type)
{
Price+=OrderOpenPrice();
}
}
}
if(Orderscnt(type)>0 && Orderscnt(type)<=4 )return(Price/Orderscnt(type));
if(Orderscnt(OP_SELL)>=5 && Orderscnt(OP_SELL)<=7)return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit)/100)));
if(Orderscnt(OP_SELL)==8 )return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit2)/100)));
if(Orderscnt(OP_SELL)==9 )return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit3)/100)));
if(Orderscnt(OP_SELL)==10)return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit4)/100)));
if(Orderscnt(OP_SELL)==11)return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit4)/100)));
if(Orderscnt(OP_SELL)>=12)return(MathAbs(HighestPrice_bid(OP_SELL)-(((HighestPrice_bid(OP_SELL)-sell1)*fibouprofit4)/100)));
if (Orderscnt(OP_BUY)>=5 && Orderscnt(OP_BUY)<=7 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==8 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit2)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==9 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit3)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==10&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit4)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==11&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit4)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)>=12&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit4)+LowestPrice_bid(OP_BUY));
else return(0);
}
اما هذا فهو عكسه اي ستوب لوز للصفقات الرابحة وليس الخاسرة
كود:if(Orderscnt(OP_BUY)>4)AvTakeProfit_mor(OP_BUY);if(Orderscnt(OP_SELL)>4)AvTakeProfit_mor(OP_SELL);
الارقام والحسابات تكلفت بها و كلها صحيحة ولكنها لا تعمل كلها مع بعض وسأعطيك امثلة بالصور الملف المرفق 491252الملف المرفق 491253كود:void AvTakeProfit_mor(int type) {
double SLS=Av_Prices_mor(OP_SELL);
double SLB=Av_Prices_mor(OP_BUY);
for(int cnt=0;cnt<OrdersTotal();cnt++)
{
bool s=OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
double sl=OrderStopLoss(),
tp=OrderTakeProfit(),
op=OrderOpenPrice();
int tk=OrderTicket();
if(OrderSymbol()==Symbol()&&OrderMagicNumber()==magic_number&&OrderType()==type)
{
if(OrderType()==OP_BUY)
{
if(NormalizeDouble(sl,Digits)!=NormalizeDouble(SLB,Digits)&&Bid>SLB)bool m2=OrderModify(tk,op,SLB,tp,0,Red);//closeOrders_sell();
}
if(OrderType()==OP_SELL)
{
if(NormalizeDouble(sl,Digits)!=NormalizeDouble(SLS,Digits)&&Ask<SLS)bool m1=OrderModify(tk,op,SLS,tp,0,Blue);//closeOrders_buy();
}
}
}
}
double Av_Prices_mor(int type)
{
double fibouloss2=fibouloss-5,fibouloss3=fibouloss-7,fibouloss4=fibouloss-10,fibouloss5=fibouloss-20;
double fibouprofit2=fibouprofit-5,fibouprofit3=fibouprofit-7,fibouprofit4=fibouprofit-10,fibouprofit5=fibouprofit-20;
double Price;
for(int i=0;i<=OrdersTotal();i++)
{
bool s=OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol()&&OrderMagicNumber()==magic_number)
{
if(OrderType()==type)
{
Price+=OrderOpenPrice();
}
}
}
if(Orderscnt(OP_SELL)>=5 && Orderscnt(OP_SELL)<=7 && sell1>Bid)return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss)+LowestPrice_bid(OP_SELL));
if(Orderscnt(OP_SELL)==8 && (sell1>LowestPrice_bid(OP_SELL)) )return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss3)+LowestPrice_bid(OP_SELL));
if(Orderscnt(OP_SELL)==9 && (sell1>LowestPrice_bid(OP_SELL)))return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss3)+LowestPrice_bid(OP_SELL));
if(Orderscnt(OP_SELL)==10 && (sell1>LowestPrice_bid(OP_SELL)))return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss3)+LowestPrice_bid(OP_SELL));
if(Orderscnt(OP_SELL)==11 && (sell1>LowestPrice_bid(OP_SELL)))return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss3)+LowestPrice_bid(OP_SELL));
if(Orderscnt(OP_SELL)>=12 && (sell1>LowestPrice_bid(OP_SELL)))return((((HighestPrice_bid(OP_SELL)-LowestPrice_bid(OP_SELL))/100)*fibouloss3)+LowestPrice_bid(OP_SELL));
if (Orderscnt(OP_BUY)>=5 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==8 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==9 && buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==10&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)==11&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
if (Orderscnt(OP_BUY)>=12&& buy1>Bid )return((((buy1-LowestPrice_bid(OP_BUY))/100)*fibouprofit)+LowestPrice_bid(OP_BUY));
else return(0);
}
مؤشر رسم الترند المكسور (بالايشموكو)
اخي مستر دولار هل يمكنني ان اطلب منك ذلك المؤشر حتى لو بمقابل مادي؟
بسم الله الرحمن الرحيم
1- في حالة الترند الهابط (توصيل قمتين ببعض)
الشروط كالاتي ...
اولاً : هنحدد سعر اعلى هاي للقمة قبل الاخيرة فوق سحابة الايشموكو بعد الكسر للاسفل وهتكون بداية الخط
ثانياً : هنحدد سعر اعلى هاي للقمة الاخيرة فوق سحابة الايشموكو بعد الكسر للاسفل وهتكون نهاية الخط
شروط تحديد القمة
1- اغلاق الشمعة فوق السحابة.
2- اغلاق خط الشيكو سبان (المزاح للخلف 26 شمعة) اعلى السحابة ايضاً.
2- في حالة الترند الصاعد (توصيل قاعين ببعض)
اولاً : هنحدد سعر ادنى للو للقاع قبل الاخير تحت سحابة الايشموكو بعد الكسر للاعلى وهتكون بداية الخط
ثانياً : هنحدد سعر ادنى للو للقاع الاخير تحت سحابة الايشموكو بعد الكسر للاعلى وهتكون نهاية الخط
شروط تحديد القاع
1- اغلاق الشمعة اسفل السحابة.
2- اغلاق خط الشيكو سبان (المزاح للخلف 26 شمعة) اسفل السحابة ايضاً.
مرفق صور توضيحية
ارجو الافادة
هل يمكن عمل مؤشر كهذا وكم ستكون التكلفة المادية؟
هههههه يا اخي خلي شوية تفاؤل
عموما الاستراتيجية شغال بيها من 8 شهور ومحققة نتائج رائعة لكن بتفوتني فرص ذهبية لذلك محتاج لها اكسبرت
المؤشر المطلوب فوق مجرد فرع في الاستراتيجية وليس اساسي
هناك شروط اخرى لم اذكرها
واجمل ما في الاستراتيجية انها ذات قواعد ثابتة
السلام عليك ورحمة الله وبركاته
عندي اكسبيرت تقاطع موفينج، وحين يتحقق شرط التقاطع يقوم بفتح صفقات كثيرة سواء شراء أو بيع حسب الشرط
اريد طريقة لقتح صفقة واحدة شراء اثناء تحقق الشرط وصفقة واحدة بيع أثناء تحقق شرط البيع
الطريقة المعروفة الخاصة ب : if(OrdersTotal()==0) لا تصلح لي لأني يمكن أن أفتح صفقة يدويا أو اشغل اكسبيرت آخر في نافذة ثانية وبالتالي مجموع الصفقات لا يساوي الصفر وبالتالي لن يتحقق شرط البيع أو الشراء.
سؤال آخر هل يوجد اخواني طريقة بسيطة او لحساب الرقم الأولي للسعر بدون تعقيد .. لأني لم أجد طريقة وقمت بالقسمة والضرب وإذافة الناتج حتى تمكنت من تفريق السعر لأرقام مفردة ثم قمت بجمع ناتجها ليعطيني الرقم الأولي .. لابد من وجود طريقة غير هذه الطريقة الكثيرة السطور والطويلة نوعا ما.
هذه هي طريقتي في حساب الرقم الأولي هي طويلة نوعا ما لكنها شغالة
اقتباس:
int pos=rates_total-prev_calculated;
int final1,final2,final3,final4,final5,priceOpen,resul t1,result11,result111,result2,result22,result222,r esult3,result33,result333,result4,result44,result4 44,result5,result55,result555,result6,result66,res ult666;
for (i=0; i<pos;i++)
{
priceOpen = Open[i]*100000;
result1 = priceOpen/10;
result11 = result1*10;
result111 = priceOpen-result11;
result2 = priceOpen/100;
result22 = result2*100;
result222 = (priceOpen-result22-result111)/10;
result3 = priceOpen/1000;
result33 = result3*1000;
result333 = (priceOpen-result33-result222)/100;
result4 = priceOpen/10000;
result44 = result4*10000;
result444 = (priceOpen-result44-result333)/1000;
result5 = priceOpen/100000;
result55 = result5*100000;
result555 = (priceOpen-result55-result444)/10000;
result6 = priceOpen/1000000;
result66 = result6*1000000;
result666 = (priceOpen-result66-result555)/100000;
final1=result111+result222+result333+result444+res ult555+result666; //24
final2=(final1/10)*10; //2
final3=final1-final2;
final4=final2/10;
final5=final3+final4;
//Alert(Open[i]);
// Comment(priceOpen,
// "\nResult111= ",+result111,
// "\nResult222 ",result222,
// "\nResult333 ",result333,
// "\nResult444 ",result444,
// "\nResult555 ",result555,
// "\nResult666 ",result666,
// "\nFinale 1 ",final1,
// "\nFinale 2 ",final2,
// "\nFinale 3 ",final3,
// "\nFinale 4 ",final4,
// " = ",final5);
int pos=rates_total-prev_calculated;
int final1,final2,final3,final4,final5,priceOpen,resul t1,result11,result111,result2,result22,result222,r esult3,result33,result333,result4,result44,result4 44,result5,result55,result555,result6,result66,res ult666;
for (i=0; i<pos;i++)
{
priceOpen = Open[i]*100000;
result1 = priceOpen/10;
result11 = result1*10;
result111 = priceOpen-result11;
result2 = priceOpen/100;
result22 = result2*100;
result222 = (priceOpen-result22-result111)/10;
result3 = priceOpen/1000;
result33 = result3*1000;
result333 = (priceOpen-result33-result222)/100;
result4 = priceOpen/10000;
result44 = result4*10000;
result444 = (priceOpen-result44-result333)/1000;
result5 = priceOpen/100000;
result55 = result5*100000;
result555 = (priceOpen-result55-result444)/10000;
result6 = priceOpen/1000000;
result66 = result6*1000000;
result666 = (priceOpen-result66-result555)/100000;
final1=result111+result222+result333+result444+res ult555+result666; //24
final2=(final1/10)*10; //2
final3=final1-final2;
final4=final2/10;
final5=final3+final4;
//Alert(Open[i]);
// Comment(priceOpen,
// "\nResult111= ",+result111,
// "\nResult222 ",result222,
// "\nResult333 ",result333,
// "\nResult444 ",result444,
// "\nResult555 ",result555,
// "\nResult666 ",result666,
// "\nFinale 1 ",final1,
// "\nFinale 2 ",final2,
// "\nFinale 3 ",final3,
// "\nFinale 4 ",final4,
// " = ",final5);