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

 
borilunad:

Show the parameters to be tested and the part of the code where they are specified!

the code has nothing to do with it.... i can't remember exactly, i can't remember exactly, but it goes like this. I wonder why it happens at some symbols. I am also interested in the same on EURGBP so I guess this is a working thing and I am just curious what it is and why. PLEASE people explain, thank you.
 
laveosa:

the code has nothing to do with it.... Just take two different MAs and at crossing we put orders in the corresponding side. When testing on USDCAD, stop and profit may be set as any, for example 10, and during the test, we look at the results and see that the stop is 7.43 and the profit 7.64. I wonder why it happens at some symbols. I am also interested in the same on EURGBP so I guess this is a working thing and I am just curious what it is and why. PLEASE people explain, thank you.

You don't take into account the spread, slippage and more. TC can't be that "homeopathically" sensitive. Everything has to work at plus or minus something, or it would be a "sure-fire" drain on Real!
 
borilunad:

You don't take into account spread, slippage and more. TC cannot be so "homeopathically" sensitive. Everything has to work at plus or minus something, otherwise it would be a "sure" drain on Real!

It turns out that when I'm testing with EURUSD and stop is 10 because the price is 0.1 for a pip and 9.7 for a pip in any other coding, so we get the same result, right?
 
laveosa:

It turns out that when I test on EURUSD the stop is 10 because the price is 0.1 for a pip, and if I use any other quote, the stop is 9.7, etc., then I get the same result, right?

You have to follow me! I have a deposit in euros and everything is counted in euros!
 
borilunad:

That's your problem! I have a depot in euros and everything counts in euros!

I think we got it all figured out :) thanks for that. I have a question again :) For me it was the best forex broker I have ever used. I have a good feeling about this one. i have a good feeling about this one, i also have a good feeling about this one.
 
laveosa:

The important thing is that it's all sorted :) thank you for that. I have a question again :) I have a very strong suspicion that my EA may not work on Alpari, but I'm sure it will work on other brokers. I need it there more than anything else, I have nothing in my journal and nothing in Expert Advisor, maybe you have some ideas?

Do you believe in miracles? Dig into your terminal! What else can I advise you?
 
er, I don't get it :/ it's kind of polite... ?
 
ok never mind, thanks anyway!!!
 

Hello, don't kick me, I'm writing my first EA. I should place one OP_SELLLIMIT pending order but in fact I place it every tick until I hit a limit.

for (int k=0;k<OrdersTotal();k++)//View all open orders

{
OrderSelect(k,SELECT_BY_POS,MODE_TRADES);
if ( OrderType()!=OP_SELLLIMIT)
OrderSend(Symbol(),OP_SELLLIMIT,Lots,Ask+(Shag/0.2)*Point,3,0,0,",123,0,Red);
}
 
Graall:

Hello, don't kick me, I'm writing my first EA. I should place one OP_SELLLIMIT pending order but in fact I place it every tick until I hit a limit.

for (int k=0;k<OrdersTotal();k++)//View all open orders

{
OrderSelect(k,SELECT_BY_POS,MODE_TRADES);
if ( OrderType()!=OP_SELLLIMIT)
OrderSend(Symbol(),OP_SELLLIMIT,Lots,Ask+(Shag/0.2)*Point,3,0,0,",123,0,Red);
}

if (!ExistOrders(Symbol(), OP_SELLLIMIT, Magic) )  OrderSend(Symbol(),OP_SELLLIMIT,Lots,Ask+(Shag/0.2)*Point,3,0,0,"",123,0,Red);


//+----------------------------------------------------------------------------+
//|  Автор    : Ким Игорь В. aka KimIV,  http://www.kimiv.ru                   |
//+----------------------------------------------------------------------------+
//|  Версия   : 12.03.2008                                                     |
//|  Описание : Возвращает флаг существования ордеров.                         |
//+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (""   - любой символ,                   |
//|                                     NULL - текущий символ)                 |
//|    op - операция                   (-1   - любой ордер)                    |
//|    mn - MagicNumber                (-1   - любой магик)                    |
//|    ot - время открытия             ( 0   - любое время установки)          |
//+----------------------------------------------------------------------------+
bool ExistOrders(string sy="", int op=-1, int mn=-1) {
  int i, k=OrdersTotal(), ty; 
  if (sy=="0") sy=Symbol();
  for (i=0; i<k; i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      ty=OrderType();
      if (ty<6) {
        if ((OrderSymbol()==sy || sy=="") && (op<0 || ty==op)) {
          if (mn<0 || OrderMagicNumber()==mn) return(True);
          }}}}  return(False);}
Reason: