MOEX.Beginner's Questions - page 6

 
Vitalii Ananev:

A very large volume will take a long time to execute, the price will not go above/below it until the limit is executed or it is cancelled.

The spread widens why? Because it cancels the best bid or ask. For example Ask = 100 - the best ask. There is one Limit order on this level. It has been removed, and the next best limiter, for example at the price of 101, has been removed. This way, even without the actual trades made, the Ask price changes, but the Last price does not change.

Is the owner of the Limit is removing the Limit?
 
Renat Akhtyamov:
The owner removes the limiter?

Who else would. There's no one else. Either the cancellation time is triggered or the person who placed it removes it.

 
Can you advise me, I trade through mt5, there is an open position, it has a stop loss, will it stay on the next day if I do not close the trade?
 
Вадим Мотеюнас:
Please advise, I trade through mt5, there is an open position, it has a stop loss, will it stay the next day if I do not close the trade?

It should stay.

 
prostotrader:

It should stay.

I just found this in the help in mt5, then how can I trade in a medium term for example?

Files:
pz3m3r.PNG  107 kb
 
Вадим Мотеюнас:

I just found this in the help in mt5, then how can I trade in a medium term for example?

Do you trade with your hands or with an EA?

 
prostotrader:

Do you trade with your hands or with an EA?

I placed a manual pending order with a stop and a take, it worked, but when I place an order there is an expiry time in the window - I haven't touched it, so it is probably set to today, but it only applies to pending orders that have not triggered?)

 
Вадим Мотеюнас:

I placed a manual pending order with a stop and a take, it worked, but when I place an order there is an expiry time in the window - I haven't touched anything, so it most likely has a date until today, but it only applies to pending orders that have not worked, take and stop has not worked yet either, so I wonder what is waiting for me tomorrow)

I see.

If it's written in the manual, but the stop loss will disappear.

If you are still awake, I will try to write an EA for automatic ST and TP recovery

 
prostotrader:

I see.

If it says in the manual, but the stop loss will disappear.

If you haven't gone to bed yet, I will try to write an EA to automatically restore ST and TP

I think the game is not worth the effort because of one horse), my question was not answered at the broker's support, so I came to the forum

 
Вадим Мотеюнас:

Thank you, I think the game is not worth the effort because of one horse), my question was not answered at the broker's techpo, so I came to the forum

I already wrote :)

Don't make a mistake entering SL and TP !!!

//+------------------------------------------------------------------+
//|                                                    AutoTP_SL.mq5 |
//|                                      Copyright 2018 prostotrader |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018 prostotrader"
#property link      "https://www.mql5.com"
#property version   "1.00"
//
input double StLoss = 0;
input double TProf = 0;
input bool   UseSL = true;
input bool   UseTP = true;
//
//+------------------------------------------------------------------+
//| Expert set stoploss & takeprofit function                        |
//+------------------------------------------------------------------+
void SetStTp(const double s_loss, const double t_profit, const ulong ticket)
{
  MqlTradeRequest request = {0};
  MqlTradeResult  result  = {0};
  request.action    = TRADE_ACTION_SLTP;
  request.magic     = 987744123;
  request.symbol    = Symbol();
  request.sl        = s_loss;     
  request.tp        = t_profit; 
  request.position  = ticket;
  if(OrderSend(request, result) == true)
  {
    if((result.retcode == TRADE_RETCODE_PLACED) || (result.retcode == TRADE_RETCODE_DONE)) 
    {
      Print(__FUNCTION__, ": SL и TP установлены.");
    }
    else
    {
      Print(__FUNCTION__, ": SL и TP не установлены!");
    }
  }
  else
  {
    Print(__FUNCTION__, ": Ордер не отослан!");
  }
}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
{
  if(PositionSelect(Symbol()))
  {
    bool add_sl = false;
    bool add_tp = false;
    double cur_sl = PositionGetDouble(POSITION_SL);
    double cur_tp = PositionGetDouble(POSITION_TP);
    ulong cur_ticket = ulong(PositionGetInteger(POSITION_TICKET));
    if(UseSL == true)
    {
      if(cur_sl == 0) cur_sl = StLoss;
      add_sl = true;
    }
    if(UseTP == true)
    {
      if(cur_tp == 0) cur_tp = TProf;
      add_tp = true;
    }  
    if((add_sl == true) || (add_tp == true)) SetStTp(cur_sl, cur_tp, cur_ticket);
  }  
}

Can you compile it?