[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 54

 

Finally, the EA is opening trades! In both directions! Hooray!

Thank you all so much for the tips!

Everything turned out as usual - I thought "what if I do this...." and it worked!

Beginner programmers will understand my joy:)))))))))))))))))))))))

GOOD LUCK TRADING!!!!!!!!!!!!!!!!!!!

 
palesandr:

I want the software to ignore the date, only the time is important

Is your advice suitable in this case?


yes. as you can see in StrToTime I gave an example without date. look in the help
 
palesandr:

I understand that.

I need to be more specific about order recalculation. Maybe an example (in code form) or a link .

//=========== SchBuy()  ===============================
//  Функция возвращает количество Buy-ордеров
//   SchBuy      - счётчик Buy ордеров
//-----------------------------------------------------------
int SchBuy(int MAGIC){
  string SMB=Symbol();
  int SchBuy=0;
  int i;
  for (i=OrdersTotal()-1;i>=0;i--) {
    if (!OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {WriteError(i);}
    else {
      if(OrderSymbol()!= SMB || OrderMagicNumber()!= MAGIC){ continue;}
      if(OrderType()==OP_BUY){ 
        SchBuy++;
      }  
    }
  }
  return(SchBuy);
}                  
//==================================================================================================
 

How to "feed" the optimizer a list of selected optimisation parameters

from a text file or some other file for further processing?

 

Transferred from a separate thread.

iv_danko 03.02.2011 09:04



Advisor triggers on entry 1 time.

How can I make it work in a loop, continuously?
 
v2812:

I noticed such a nuance when I prescribe a print in my EA, namely:

double Up = iCustom(NULL, 0, "best div original", "*** CCI-OnArray Settings ***", 12, 3, 5, 25, "*** Indicator Settings ***", false, false, false, 0, 1);

Print ("+++++++++++++", Up);

the Expert Advisor shows the following result - ++++++++++++++ 2147483647. I can see the same number for up and down buffers as well. Please, advise what kind of code this is? And how to "get" the value from Ikastom exactly when the arrow appears?

 

is the maximum number that can be written in 4 bytes,

in hexadecimal it is 7FFFFFFFF, or it is -1, i.e. the function returns an error.

 
iv_danko:

is the maximum number that can be written in 4 bytes,

in hexadecimal it is 7FFFFFFFF, or it is -1, i.e. the function returns an error.

Not an error, but EMPTY_VALUE, an empty value. The indicator buffer can be filled with EMPTY_VALUE (=2147483647) or zero when there is no signal by default.
This can be set beforehand with SetIndexEmptyValue( int index, double value)
 
Hello. Please write the code to open a pending(stop) order relative to an already open (last order).
 
Sergstuddek:
Hello. Please write the code to open a pending (stop) order against an already open (last) order.

you need a pending bystop/selestop order

Or should I place a stop loss in an existing order?

Reason: