10-02-2018, 11:48 PM
|
المشاركة رقم: 2
|
البيانات |
تاريخ التسجيل: |
May 2015 |
رقم العضوية: |
25450 |
المشاركات: |
1 |
بمعدل : |
0.00 يوميا |
الإتصالات |
الحالة: |
|
وسائل الإتصال: |
|
|
كاتب الموضوع :
shivaa
المنتدى :
منتدى المؤشرات و الاكسبيرتات
رد: ممكن مساعد في كتابه داله تبحث عن أخر صفقه مفعله
قد تساعدك هذه.
كود:
double LastOpenBuyPrice(string smbl){
int cnt, total;
total = OrdersTotal();
double oprice=0;
for(cnt=0; cnt<total; cnt++){
if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==true)
if(OrderSymbol()==smbl && OrderType()==OP_BUY && OrderMagicNumber()==MagicNo){
oprice = OrderOpenPrice();
}
}
return(oprice);
}
double LastOpenSellPrice(string smbl){
int cnt, total;
total = OrdersTotal();
double oprice=0;
for(cnt=0; cnt<total; cnt++){
if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==true)
if(OrderSymbol()==smbl && OrderType()==OP_SELL && OrderMagicNumber()==MagicNo){
oprice = OrderOpenPrice();
}
}
return(oprice);
}
|
|
|