[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 36

 
TVA_11:

What will happen, what can happen if

buy, sell without specifying a margin for slippage.Usually +- 2 points are put in.

The response is a requote.

And if no slippage value is set, is it guaranteed to buy?

No. There can be a requote no matter what you put in OrderSend()
 

So... Requote, that's the broker's wish.

If he doesn't have the opportunity, he doesn't trade.

How long should we wait after that (according to trader's ethics) to repeat the sell, buy request again?

 
TVA_11:

So... Requote, that's the broker's wish.

If he doesn't have the opportunity, he doesn't trade.

How long should you wait after that (according to trader's ethics) to repeat the sell, buy request again?


It depends on how long you watch a pickpocket take your wallet out of your pocket while laughing in your face and about to spit in it (your face).

Change the company. I recommend Al*ari - ECN accounts, no such crap there.

 
TVA_11:

What will happen, what can happen if

buy, sell without specifying a margin for slippage.Usually +- 2 points are put in.

The response is a requote.

And if you don't set the slippage value, is it guaranteed to buy?


You can forget about this setting. Requote occurs if the EA wants to take your money, they do not care what the slippage is and they will do it anyway.) This is the reality of algotrading most of the scam companies who call themselves "the best broker XXXXX" (XXXXXX - insert name of a continent or galaxy, whatever)

Change or change the setting, everything stays the same.

 
Hello ! Can you give me a description of a real bar +1. For example I need the price of the next bar, not a real bar.
Ask[0]+1*Point?   // Но ведь пункт это не следующий бар
 
skyjet:
Hello ! Can you give me a description of the current bar +1. For example i need the price of the next bar, not the present one.

Asc and bid are current only.


If you want high/low/open/close, then use that:

high[0] - current bar high

high[1] - high of the previous bar

Etc. etc.

 
skyjet:
Hello ! Can you give me a description of the current bar +1. For example I need the price of the next bar, not the real one.


The above replied, I'll add to it:

1) terminal does not store information about past Ask, i.e. there is only current Ask, same with Bid.

2) Bars are built by Bid prices, i.e. Close[0] = Bid.

 
ilunga

Thank you very much for the answer! But still, how to describe the future bar following Ask[0],Bid[0]?
 

Hello There is an indicatorhttps://www.mql5.com/ru/code/7176

It works well on history. In real life it is very tattered, etc.

Is it possible to redraw/recalculate this indicator every bar or every interval?

For example if you trade on m5 and waiting for a signal it may not come, you are waiting for 15-20 minutes, then you switch to any other timeframe and again on m5 and it turns out that you have a signal. You switch to another timeframe and again on m5 and it turns out that it was there 10 minutes ago. How can you automatically recalculate it without switching to another timeframe?

 

I have a strange thing going on here. Here is the function for opening orders:

//+-------------------------------------------------------------------------------------+
//| Открытие длинной позиции                                                            |
//+-------------------------------------------------------------------------------------+
bool OpenBuy()
{
  int ticket = -1;
  string myNote = "Сов баянул";
  
  double price = High[1] + i_thresholdFromInput*pt;
  double SL = Low[1] - i_thresholdFromBasedSL*pt ;

  if(SL < g_stopLevel)
    SL = g_stopLevel*pt;
  
  ticket = OrderSend(Symbol(),OP_BUYSTOP,0.1,NormalizeDouble(price,Digits),i_slippage,0,0,myNote,i_myMagic,TimeCurrent() + 600,Navy);
  
  if(ticket > 0 && OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
    if(!OrderModify(ticket,OrderOpenPrice(),NormalizeDouble(SL,Digits),NormalizeDouble(High[1] + i_tp*pt,Digits),0,Navy))
    return(false);
  
  return(true);
}
//+-------------------------------------------------------------------------------------+
//| Открытие короткой позиции                                                           |
//+-------------------------------------------------------------------------------------+
bool OpenSell()
{
  int ticket = -1;
  string myNote = "Сов шортанул";
  
  double price = Low[1] - i_thresholdFromInput*pt;
  double SL = High[1] + i_thresholdFromBasedSL*pt;
  
  if(SL < g_stopLevel)
    SL = g_stopLevel*pt;
    
  ticket = OrderSend(Symbol(),OP_SELLSTOP,0.1,NormalizeDouble(price,Digits),i_slippage,0,0,myNote,i_myMagic,TimeCurrent() + 600,Red);
  
  if(ticket > 0 && OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
    if(!OrderModify(ticket,OrderOpenPrice(),NormalizeDouble(SL,Digits),NormalizeDouble(Low[1] - i_tp*pt,Digits),0,Red))
    return(false);
    
  return(true);
}

You can see that the stop is placed at the previous candle's extremum + indent. Nevertheless the tester constantly argues about wrong stops and stubbornly generates error 130. In visual testing everything looks appropriate, stops even visually exceed stopLevel. Although I am testing at Alpari, stops can even be placed within spread. I do not understand why there is an error on stop.

What else could it be?

By the way, the order on the screenshot is open, there is an error here too: