[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 382

 
Chekh:

Hello friends, please help me to understand how to install EAs on MT4.

I opened the "Navigator" window, then "Expert Advisors", at the very bottom there is a line "749 more", I clicked and was redirected to a page with lots of different Expert Advisors, but I do not know how to install them in my terminal.

Download, place in the experts folder, compile, if necessary.
 
Thank you nadya:)
 
MIR-ASOV:
Thank you nadya:)
You're welcome. (you can write it in person ;-)
 

Good time all!!!

I wonder where to find a function or code in the EA, under the condition of placing two pending orders.

If you want to place two pending orders once a day, they have their own sliders, and when both are closed, the next pair will be put out only on the next day at a certain time.

If you have already responded, thank you!

 
Valdemar:

Good time all!!!

I wonder where to find a function or code in the EA, under the condition of placing two pending orders.

If you want to place two pending orders once a day, they have their own sliders, and when both are closed, the next pair will be put out only on the next day at a certain time.

If you have already responded, thank you!

That's right... Start writing, show us where you can't - we'll help you there... But otherwise...
 
artmedia70:
That's right... Start writing, show us where you can't - we'll help you there... But otherwise...

extern double Lot=1.0;
extern int MagicNamber=777;
int init()
  {
  
  return(0);
  }

int deinit()
  {

   return(0);
  }

int start()
{
int Total,Ticket,Ticket2;  
double Max,Min,
Max1,Min1,
TP,TP2;
Total=OrdersTotal();  
if(isTradeTimeInt()==true)
{
 
 for(int i=0; i<=Total; i++)
   {
  if (OrderSelect(i,SELECT_BY_POS)==true)
    {
    if( !OrderSelect(i,SELECT_BY_POS))
    {
     Alert(GetLastError(),"это номер ошибки в OrderSelect");
    }
    else
    {
    if(OrderMagicNumber()==MagicNamber)
    return(0);
    }
    }
   Max=High[iHighest(Symbol(),PERIOD_M5,MODE_HIGH,39,0)];
   Min=Low[iLowest(Symbol(),PERIOD_M5,MODE_LOW,39,0)];
   Max1=Max+0.0010;
   Min1=Min-0.0010;
   TP=Max1+((Max1-Min1)*2);
   Ticket=OrderSend("GBPUSD",OP_BUYSTOP,Lot,Max1,2,Min1,TP,NULL,MagicNamber,0,CLR_NONE);
   if(Ticket>0)
    {
     Alert("Ордер на покупку открыт-",DoubleToStr(Max1,5));
     TP2=Min1-((Max1-Min1)*2);
     Ticket2=OrderSend("GBPUSD",OP_SELLSTOP,Lot,Min1,2,Max1,TP2,NULL,MagicNamber,0,CLR_NONE);
     Alert("Ордер на продажу открыт-",DoubleToStr(Min1,5));
    }
    else
   {
     Alert("Ошибка№=",GetLastError()); 
     return;
    }
 }
 
 }
 return;
}
return(false);


 
bool isTradeTimeInt(int hb=13, int mb=30, int he=18, int me=30)          
{
  datetime db, de;           
  int      hc;              

  db=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+" "+hb+":"+mb);
  de=StrToTime(TimeToStr(TimeCurrent(), TIME_DATE)+" "+he+":"+me);
  hc=TimeHour(TimeCurrent());
  if (db>=de) 
  {
    if (hc>=he) 
    de+=24*60*60; 
    else 
    db-=24*60*60;
  }

  if (TimeCurrent()>=db && TimeCurrent()<=de) return(True);
  else return(False);
}
  
In this code, I can't do the upgrade described above....there are two pending orders, and when they close, the orders are set again, but the condition is that they should be set once a day.....may be the function from KimVi to upgrade...
 

Please explain why the sell closed above Open[0].

 
Valdemar:
In this code I can't make the upgrade described above.... here two pending orders are placed, and when they close they are placed again, but the condition is that they should be placed once a day..... can be an upgrade in the function from KimVi...

extern int HOUR;

extern int MINUTE;

if(Hour()==HOUR && Minute()==MINUTE) OrderSend.....

 
001:

Please explain why the sell closed above Open[0].


You can answer for yourself - what is Ask, Bid. And at what prices positions are opened and at what prices they are closed
 
Vinin:

You can answer for yourself - what is Ask, Bid. And at which prices positions are opened and at which they are closed

Yes, got it, thanks! Didn't take into account that the spread is bigger than usual for the pound( Terminal is offline)
Reason: