[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 148

 
It has happened before, I think it's a trick of DC's to make it problematic to test anything.

Yes, that's what I thought too... But it's just that two DTs have the same thing... Now to test the EA, do I have to download some quotes (from the outside), similar to the current market?
 
BeerGod:
No reference to it in the EA code means that the function gives the number of pips between the market price and the opening price of the order, you compare this value and if it is equal to or greater than 50, you are allowed to open a new order.
Thank you very much
 
first_may:

What criterion do I use to search for it in codebase?

by name, only it doesn't work now anyway, as I don't broadcast stock exchange data for it.
 
FAQ:

By name, only it's not working right now anyway as I don't broadcast stock data for it.


I see. Also:

1 was the answer for now it will not be, so in the long term it may reappear?

2 there is an indicator that shows volumes but not tick volumes?

 

Hello, I have this problem:

I need to implement a way for the EA not to open new positions until the previous ones are closed (conditionally there are 3).

I don't really know where to look, i.e. I would "google", but I don't know how to properly put the question to the search engine.

The code is as follows:

//+------------------------------------------------------------------+
//|                                            МойПервыйСоветник.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//--- input parameters
extern int          magic = 432221;
extern double       TakeProfit=50;
extern double       StopLoss=70;
extern double       Lots_SELL=0.1;
extern double       Lots_BUY=0.1;
//extern bool Buy=false; //для открытия ордера на покупку
//extern bool Sell=false; //для открытия ордера на продажу
double LS,LB,SL,TP,SL_S,TP_S,SL_B,TP_B,i;
                    
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
    LS=Lots_SELL;
    LB=Lots_BUY;
    SL=StopLoss;
    TP=TakeProfit;
    SL_S=(Ask+SL*Point);
    TP_S=(Ask-TP*Point);
    SL_B=(Ask-SL*Point);   
    TP_B=(Ask+TP*Point);
    
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   
   
  OrderSend(Symbol(),OP_SELLSTOP,LB,Bid-40*Point,2,SL_S,TP_S);
  OrderSend(Symbol(),OP_BUYSTOP,LS,Ask+40*Point,2,SL_B,TP_B);
  OrderSend(Symbol(),OP_SELL,0.01,Bid,2,SL_S,TP_S);
  //OrderSend(Symbol(),OP_BUYSTOP,0.2,Ask+20*Point,3,Ask-70*Point,Ask+50*Point);
  //OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-10*Point,3,Ask+100*Point,Bid-50*Point);

}
     
  

  
  
   return(0);
  }
//+------------------------------------------------------------------+

I probably misread something somewhere\or misunderstood something or just forgot.

Please give me a piece of code or point me in the "right way", I'll be very grateful. =)

 

1) so yes.

2)there is a wagon and a small cart on the internet, but where do they get the data ? i got it from the CME

 
emonh:

Hello, I have this problem:

I need to implement a way for the EA not to open new positions until the previous ones are closed (conditionally there are 3).

The code is as follows:

I may have misread/overlooked/understood something or just forgot.

Please give me a small part of the code or point me in the "right way", I would be very grateful. =)


Add a line.

int start()
  {
   if (OrdersTotal()>0)return(0);
...
 
Roger:


Add a line.


Thank you very much!

Tried several variations with this operant, but didn't think of this one in particular, yep.

And thanks again.

 

Um, can you tell me how it is that in the tester the take profit is occasionally hit by the opening price, assuming TP=700pp?

 
FAQ:

1) so yes.

2)there is a wagon and a small cart on the internet, but where do they get the data ? i got it from the CME


CME is what?
Reason: