//=======XXXXXXXXXXXX==0-3-6===++++++===========
 int MyTypeX0()
 {
 int y=0;
for (int i=0;i<=OrdersHistoryTotal()+1;i++)
 {
 OrderSelect (i,SELECT_BY_POS,MODE_HISTORY);
 if(OrderSymbol()==Symbol()&&(OrderMagicNumber()==Magic||OrderMagicNumber()==Magic3||OrderMagicNumber()==Magic6))
y=OrderType();
}
 return(y);
 }
 //=======X0===++++++++++++++++++++++++++++++
double lastlotX0()
{
double y;
for (int i=0;i<=OrdersHistoryTotal()+1;i++)
{
OrderSelect (i,SELECT_BY_POS,MODE_HISTORY);
if (OrderSymbol()==Symbol()&&(OrderMagicNumber()==Magic||OrderMagicNumber()==Magic3||OrderMagicNumber()==Magic6))
y=OrderLots();
}
return (y);
}
//==============++++
double BlotX0()
{
double y = lot;
if (MyProfitX0()<0)
 y=lastlotX0()*Multi;
 if(MyProfitX0()>0&&MagicX0()==Magic)
 y=lastlotX0()*Multi;
  return(y);
  }
//-----------
double MylotX0()
{
double y=BlotX0();
if(BlotX0()>HighestLot)
y=AfterHigest;
if(BlotX0()<LowestLot)
y=AfterLowest;
return(y);
}
//================++++++++++++++++++++++++++++++
double lastlotX1()
{
double y;
for (int i=0;i<=OrdersHistoryTotal()+1;i++)
{
OrderSelect (i,SELECT_BY_POS,MODE_HISTORY);
if (OrderSymbol()==Symbol()&&(OrderMagicNumber()==Magic1||OrderMagicNumber()==Magic4||OrderMagicNumber()==Magic7))
y=OrderLots();
}
return (y);
}
//==============++++
double BlotX1()
{
double y = lot;
if (MyOrderRestart()==0&&MyProfitX1()<0&&lastlotX1()<lot*4)
 y=lastlotX1()+Multi;
 if (MyOrderRestart()==0&&MyProfitX1()<0&&lastlotX1()>=lot*4&&lastlotX1()<lotBigX())
 y=lotBigX();
 if (MyOrderRestart()==0&&MyProfitX1()<0&&lastlotX1()>=lotBigX()-Multi&&lastlotX1()<lotBigX()+lot*2)
 y=lastlotX1()+Multi;
  if (MyOrderRestart()==0&&MyProfitX1()<0&&lastlotX1()>=lotBigX()+lot*2)
 y=lot;
 if (MyOrderRestart()==0&&MyProfitX1()>0)
 y=lot;
  return(y);
  }
//-----------
double MylotX1()
{
double y=BlotX1();
if(BlotX1()>HighestLot)
y=AfterHigest;
if(BlotX1()<LowestLot)
y=AfterLowest;
return(y);
}
//================++++++++++++++++++++++++++++++
 double lastlotX2()
{
double y;
for (int i=0;i<=OrdersHistoryTotal()+1;i++)
{
OrderSelect (i,SELECT_BY_POS,MODE_HISTORY);
if (OrderSymbol()==Symbol()&&(OrderMagicNumber()==Magic2||OrderMagicNumber()==Magic5||OrderMagicNumber()==Magic8))
y=OrderLots();
}
return (y);
}
//==============++++
double BlotX2()
{
double y = lot;
if (MyOrderRestart()==0&&MyProfitX2()<0&&lastlotX2()<lot*4)
 y=lastlotX2()+Multi;
 if (MyOrderRestart()==0&&MyProfitX2()<0&&lastlotX2()>=lot*4&&lastlotX2()<lotBigX())
 y=lotBigX();
 if (MyOrderRestart()==0&&MyProfitX2()<0&&lastlotX2()>=lotBigX()-Multi&&lastlotX2()<lotBigX()+lot*2)
 y=lastlotX2()+Multi;
 if (MyOrderRestart()==0&&MyProfitX2()<0&&lastlotX2()>=lotBigX()+lot*2)
 y=lot;
 if (MyOrderRestart()==0&&MyProfitX2()>0)
 y=lot;
// if(MyProfitX2()>0&&MagicX2()==Magic2)
 //y=lastlotX2()*Multi;
  return(y);
  }
//-----------
double MylotX2()
{
double y=BlotX2();
if(BlotX2()>HighestLot)
y=AfterHigest;
if(BlotX2()<LowestLot)
y=AfterLowest;
return(y);
}
//================++++++++++++++++++++++++++++++
double Pend()
{
int y=0;
 for(int i=OrdersTotal()-1;i>=0;i--)
 {
 OrderSelect (i,SELECT_BY_POS,MODE_TRADES);
  if(OrderType()==3)
y=OrderTicket();
}
 return(y);
 }
//=====
 int MyOrderStop()
 {
int y=0;
 for(int i=OrdersTotal()-1;i>=0;i--)
 {
 OrderSelect (i,SELECT_BY_POS,MODE_TRADES);
  if(OrderMagicNumber()==MagicStop)
y=OrderTicket();
}
 return(y);
 }
 //=====

المصدر: Aziz ghanem
masry500

طابت أوقاتكم وبالله التوفيق

  • Currently 0/5 Stars.
  • 1 2 3 4 5
0 تصويتات / 8 مشاهدة
نشرت فى 8 مارس 2025 بواسطة masry500

ساحة النقاش

عدد زيارات الموقع

122,902