Questions from Beginners MQL4 MT4 MetaTrader 4 - page 244

 
transcendreamer:

You are welcome... Literature is the documentation here on the website, start with the event model, learn the OnTick OnInit OnCalculate OnDeinit functions, from there move to the data, buffers Close, Time and so on, then to the trading functions, and then as needed, and you are already an international expert.

If you're interested, the bar closes(opens). There is a 5-7 point margin above and below the opening. The price moves out of this mini channel - the deal is opened.

It is a task to write my first Expert Advisor. I will be glad to help.

 
AS_SS:

In case of interest, the bar closes(opens). Indent 5-7 pips above and below the opening. The price goes beyond this mini channel - the deal is opened.

It is a task to write my first Expert Advisor. I would be glad to help.

You may try to look for a ready-made even

 

Good afternoon. Help with the EA. The strategy says that if a stop triggered, then the EA should add (the number of pips) to the next TP from the history by ID, but it does not add pips for some reason.

What is wrong with the code?

if(isLimitOn && OrderSelect(OrderMagicNumber(), SELECT_BY_TICKET, MODE_HISTORY)){
            tpc += stop_loss;
            if(OrderSelect(lastMagic, SELECT_BY_TICKET)){
               if(OrderType() == OP_BUY) {
                  double tp_price = NormalizeDouble((OrderOpenPrice() + Point() * (tp + tpc)), Digits);
                  if(!OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), tp_price, OrderExpiration()))
                     Print("Ошибка модификации ордера:", GetLastError());
               }else if(OrderType() == OP_SELL){
                  double tp_price = NormalizeDouble((OrderOpenPrice() - Point() * (tp + tpc)), Digits);
                  if(!OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), tp_price, OrderExpiration()))
                     Print("Ошибка модификации ордера:", GetLastError());
               }
            }
               
            isLimitOn = false;
         }
 
Hello guys. Can you please tell me where I can download the Roboforex quotes archive for MT4 minute chart (eurusd)? I have contacted the support, they did not give me anything. I need quotes history for at least 1-2 years
 
 
Aleksei Stepanenko:

Here's one from 1999.

Thank you)

 

Hi all!

Can you tell me if it is possible to use MT4 synchronously from a smartphone and a PC on one account?

So, what to place orders via smartphone, and see and edit in PC realtime?

Thank you!

 
T41:

Hi all!

Can you tell me if it is possible to use MT4 synchronously from a smartphone and a PC on one account?

So, what to place orders via smartphone, and see and edit in PC realtime?

Thank you!

Yes. You can place pending orders from your smartphone and you can edit them on your PC when you go home.
 
SGarnov:
You can place pending orders on your smartphone, and you can edit them on your computer when you get home.
Many thanks for the science))
 

For some reason the previous message got deleted.

Go through the positions in the loop, grab each one and look for the biggest ticket among all of them. Then work with it.

 int ticket = -1;
 for(int i = 0; i < OrdersTotal(); i++)
    {
     if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) == true)
       {
        if(OrderTicket() > ticket)
          {
           ticket = OrderTicket();
          }
       }
    }
  
  if(ticket != -1)
    {
     if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES) == true)
       {
        // Делаем что-то с позицией
       }
    }
Reason: