[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 889

 

Can you tell me more about this, because I'm confused:

ticketSell = OpenPendingOrderSell(1, iLotsSell, Bid, slip, Ask, 0, 0, EAName + "-" + NumOfTradesSell, MagicNumberSell, 0, HotPink);

where do you want to put it: "EURUSD, Period_H1,

I need it to understand if I can do it this way:

extern int MagicNumber = 312;
int ticket;
bool intersectionX = FALSE,
     intersectionY = FALSE;
int start()

  { 
if  (Ask-iCustom ("EURUSD", Period_H1, "Indicator",0,0) == 0)  {
intersectionX = TRUE;
intersectionY = FALSE;
}
if  (iCustom ("EURUSD", Period_H1, "Indicator",1,0)-Bid == 0) {
intersectionY = TRUE;
intersectionX = FALSE;
}
if(intersectionY){
ticket = OpenPendingOrder("EURUSD", Period_H1, iLots, OP_BUY, 3, Ask,  0, 0, MagicNumber);
}
}
 
belck:

Can you tell me more about this, because I'm confused:

where do you want to put it: "EURUSD, Period_H1,

This is what I need to understand if I can do it this way:

Go here and learn from the working functions. When you understand it all, you can write your own...
 
artmedia70:
Go here, learn the working functions. When you understand everything, you can easily write your own...

Thanks.

I have encountered a strange phenomenon here: a real signal on the chart for the EA to open a trade, but it does not start and does not give any errors. what can it be?

 

I keep reading and reading and I just can't seem to get it.

в

ticket=OrderSend(sy, op, ll, pp, Slippage, sl, tp, "", mn, ex, clOpen);

Is this a currency chart? If so, how do I get it right?

Like this?

ticket=OrderSend("EURUSD", op, ll, pp, Slippage, sl, tp, "", mn, ex, clOpen);

or

ticket=OrderSend(sy"EURUSD", op, ll, pp, Slippage, sl, tp, "", mn, ex, clOpen);
 

The thing is that I'm currently making an EA that can be placed on any chart and it only works with the currency pairs and periods that it is specified in the code itself.

So I don't understand how to do it properly.

i have it like this:

double one = iCustom ("EURUSD", RERIOD_H1, "indicator",14,0,0);

Buy = (one < 80);

if (Buy){
ticket = // тут указывать валютную пару или нет?? вот этого я не до пойму. если да то так как я вверху из вариантов привел или как то по другому?
}
 
belck:

I keep reading and reading and I just can't seem to get it.

в

Is this a currency chart? If so, how do I get it right?

Like this?

or

If this is for Igor Kim's function, he gives a script or description of how to call it for each of his functions.
In this case, sy is a variable passed to the function when calling it. It is checked in the function itself and if NULL or "" is passed, sy=symbol();
The rest is the same.
 
belck:

The thing is that I'm currently making an EA that can be placed on any chart and it only works with the currency pairs and periods that it is specified in the code itself.

So I don't understand how to put it in the right place.

i have it like this:

Is this what it is?
Buy = (one < 80);
How is that?
 

I have found

int start()                               // Спец. функция start
  {                                       // Открытие BUY
   OrderSend("GBPUSD",OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
   return;                                // Выход из start()
  }

Now how do I correctly understand the situation, at which period the position will be opened. I need that when a new candle appears on PERIOD_H1 the order is opened:

ouble one = iCustom ("EURUSD", RERIOD_H1, "indicator",14,0,0);

Buy = (one < 80);

if (Buy){

OrderSend("GBPUSD",OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
}

or is this the only option?

ouble one = iCustom ("EURUSD", RERIOD_H1, "indicator",14,0,0);

Buy = (one < 80);

      PrevClBuy = iClose("EURUSD", RERIOD_H1, 2);
      CurrClBuy = iClose("EURUSD", RERIOD_H1, 1);
if (PrevClBuy > CurrClBuy)
if (Buy){

OrderSend("GBPUSD",OP_BUY,0.1,Ask,3,Bid-15*Point,Bid+15*Point);
}
 
belck:

The thing is that I'm currently making an EA that can be placed on any chart and it only works with the currency pairs and periods that it is specified in the code itself.

So I don't understand how to do it properly.

i have it like this:

Probably need it like this (gave an example of a kim function call with a time check after opening the previous pose, well, and some variables out of my head...):
double pa = MarketInfo(Symbol(),MODE_ASK);
double pb = MarketInfo(Symbol(),MODE_BID);
double po = MarketInfo(Symbol(),MODE_POINT);
double sl, tp;


double one = iCustom ("EURUSD", RERIOD_H1, "indicator",14,0,0);

if (one < 80) Buy=true;

if (Buy)
   {
      MagicB=51;                                         // Задаём магик... 5 и 1; 5 = пять минут, 1 = стратегия 1
      New_Comm="Expert";                                // Задаём комментарий для позиции
      sl = pb-StopLoss*po;
      tp = 0;
         
      if (SecondsAfterOpenLastPos(NULL, OP_BUY, MagicB)>=7*60)
          OpenPosition(NULL,OP_BUY,Lots,sl,tp,MagicB,New_Comm);
   }
 
belck:

I have found

Now how do I correctly understand the situation, at which period the position will be opened. I need that when a new candle appears on PERIOD_H1 the order is opened:

or is this the only option?

It's all wrong. If the challenge is Igor Kim's function, I gave an example above.
Reason: