وهذه الامر كلها مجموعه في صفقة الشراء
[PHP]
if(iClose(0,0,3)>iOpen(0,0,3)){if(iClose(0,0,3)<iM A(0,0,200,0,0,0,3)&&iOpen(0,0,2)>iMA(0,0,200,0,0,0 ,3)&&iClose(0,0,2)>iOpen(0,0,2)
iLow(0,0,2)<=iMA(0,0,200,0,0,0,3)&&iOpen(0,0,1)>iC lose(0,0,2)&&iClose(0,0,1)>iOpen(0,0,1))OrderSend( Symbol(), OP_BUY,1, Ask, 3, Ask-0.0020,Ask+0.0020, "",1236332, 0, Green);}[/PHP]
ونضيف داله جديده وهي دالة OrdersTotal()
ونجعلها مساويه لصفر حتى لا يفتح صفقه وهنا صفقه مفتوحه
OrdersTotal()==0
وهنا الكود بعد اضافة الداله
[PHP]if(iClose(0,0,3)>iOpen(0,0,3)){if(iClose(0,0,3)<iM A(0,0,200,0,0,0,3)&&iOpen(0,0,2)>iMA(0,0,200,0,0,0 ,3)&&iClose(0,0,2)>iOpen(0,0,2)
iLow(0,0,2)<=iMA(0,0,200,0,0,0,3)&&iOpen(0,0,1)>iC lose(0,0,2)&&iClose(0,0,1)>iOpen(0,0,1)&&OrdersTot al()==0)OrderSend(Symbol(), OP_BUY,1, Ask, 3, Ask-0.0020,Ask+0.0020, "",1236332, 0, Green);}
[/PHP]