Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1545

 
Good day Dear traders.
help me to understand, I do not understand this topic, as I have never been involved in it.
My friend has got into MT4 at the invitation of some broker and transferred some money to him.
a month has gone by but the broker keeps on spinning his head that it is too early to withdraw.
I took a couple of pictures from his office, look at it and tell me if this is a real or demo account and how to withdraw money from this application
 

money is withdrawn only through "personal account" in the DC interface (or through the face of a specific person, as the case may be) :-)

If you have an account at WhereTamForex.com, then you have entered money there and withdrawn it from there

 
Антон Кувайцев:
Good day Dear traders.
help to understand, I am not familiar with this topic, as I have never done this before.
My companion got into MT4 on the invitation of some broker, translated his money.
a month passed and the broker is still giving him headaches that it is too early to withdraw.
I took a couple of pictures from his office, look at it and tell me if this is a real or demo account and how to withdraw money from this application

Fraudulent website of a fraudulent alleged broker.

Just type the name into google and read about the activities of these scammers.

No money is withdrawn from the platform, nor is any money deposited into it. A trading platform is just a tool to trade with the broker where you (or your mate) opened your account.

And the money must be withdrawn exactly in the private office of the company to which the money was transferred.

Do you understand? This website is the website of the developers of the MetaTrader 5 and MetaTrader 4 trading platforms. You do not deposit any funds here, so you may not withdraw them from here. Just as you do not withdraw them from the trading platform (it's just a program) - you withdraw them from the personal account of your broker (the one you opened a real trading account with).

 
Maxim Kuznetsov:

money is withdrawn only through "personal account" in the DC interface (or through the face of a particular person, as the case may be) :-)

If you have an account at WhereTamForex.com, then you have entered money there and withdrawn it from there



my broker has given my friend access to see the growth and movement of funds in MT4 application, but he cannot get access to the funds themselves, that is, go to a platform through which the funds were deposited and withdraw them there.
Since the broker did not give him the username and password for the platform itself...
he transferred the money directly to the broker, not deposited it himself through the platform
 
Антон Кувайцев:
MT4 just displays the balance and trade function and the withdrawal is made through another platform, am I right ??

and another question, is it possible that the broker somehow gave my friend access to see the growth and movement of funds in the MT4 application but he cannot get access to the funds themselves, that is, go to a platform through which the funds were deposited and withdraw them there.
Since the broker did not give him the username and password for the platform itself...
he transferred the money directly to the broker, not deposited it himself through the platform

Which broker?

The money is transferred to the account of a legal entity. All DCs are legal entities.

The transaction is made (usually with very few exceptions, regular large clients) in the DC web interface.

The reverse transaction is done there as well. And the opinion of DC's experts on should/should not be more than a consultation, they cannot forbid the withdrawal. They can slightly delay checking transactions. Another thing is that withdrawals/transfers can "hang in limbo" while banks check them.

---

probably crooks. And a wonderful naïveté about their own money from the client. And they take advantage of it.

That's what they use. There have been cases, even described on this forum, when the scammer takes a lot of real money and put a demo account for this amount to the client. This, of course, is purely criminal

 
Антон Кувайцев:
MT4 just displays the balance and provides the function of trading, while the withdrawal occurs through another platform - am I correct?

and another question, is it possible that the broker somehow gave my friend access to see the growth and movement of funds in the MT4 application, but he cannot get access to the funds themselves, that is, go to a platform through which the funds were deposited and withdraw them there.
Since the broker did not give him the username and password for the platform itself...
he transferred the money directly to the broker, not deposited it himself through the platform

1. the trading platform shows the balance, amount of money in the account, available funds in the account, collateral, open positions and orders placed, trading history, etc. and therefore allows you to trade.

2. A fraudulent broker (or rather a dealing centre - because a broker cannot be a fraud - it is a registered organization with all the licenses) can "draw" history. But here's the interesting thing - if your friend has not opened any positions himself, there may not be any movement of funds on the account. Judging by the screenshots, he has a baoan and some credit, and the available funds are equal to the sum of the balance and credit - so there are no open positions, and the money can be withdrawn (except for credit ones).

3. When you open an account with the broker, login and password are sent in the letter that can be found in the Mail tab of the trading platform (or you can write them down immediately after creating the account - they are shown with a note to save them in a safe place)

4. Naturally, the money to the trading account must be transferred through the personal cabinet of the broker, at which the trading account is opened. The trading platform is just a tool for working with your trading account and trading on it.

 
Artyom Trishkin:

2. Fraudulent broker (or rather DC - dealing centre - as a broker cannot be a fraudster - it is a registered organisation with all the licences)

The Central Bank of Russia has a different opinion, there is even a black list of foreign brokers from the Central Bank and the presence or absence of licenses was not the main reason for inclusion in this list, there are other requirements of the CB when working with the Russian-speaking audience

google help, read it a couple of months ago on rbc

 
Is there any way in Metatrader5 to disable the automatic renewal of an expired contract?
 
MakarFX:

Put up the code, I think the error is here "OrderMagicNumber()"

or you could try it like this

Tried to insert it, but it doesn't compile. I am exposing all the code, if necessary, I will show a screenshot of compilation. I think there may be another problem, my take is set in relation to the stop via coefficient (external variable), maybe it should be changed to manual setting and it will be easier for EA to add?
input int takeProfitC = 2;// Коэффициент Take Profit
input int stop_loss = 100;//Уровень Stop Loss
input int stop_count = 2;//Количество Stop Loss
input double lots = 0.01;//Лоты
input int slippage = 30;//Проскальзывание
input int datePeriod = 48;// Время удержания при SL


int tp = 0;
int tpc = 0;
double tp_price_old = 777;
int stopLossCount = 0;
datetime startOrder = 0;
int pending_ticket = 0;
int lastMagic = 0;
bool isLimitOn = false;
bool isStart = True;
datetime startTime = 0;
bool isFinal = false;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit() {
//
   //OrderSend(Symbol(), OP_SELL, 0.01, 0.76228, 300, 0, 0);
   //OrderSend(Symbol(), OP_SELLSTOP, 0.01, 0.77057, 300, 0, 0);
   //OrderSend(Symbol(), OP_BUYSTOP, 0.01, 0.76928, 300, 0, 0);
   tp = stop_loss * takeProfitC;
//---
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
//--

}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick() {
//---
//Comment("StopCount: " + stopLossCount + "\n" + "CurrentStopC: " + stop_count);
   for(int i = OrdersTotal() - 1; i >= 0; i--) {
      if(OrderSelect(i, SELECT_BY_POS)) {
         if(OrderSymbol() == Symbol()) {
         int magic = OrderMagicNumber();
            if((OrderType() == OP_BUY || OrderType() == OP_SELL) && OrderOpenTime()) {
               int ticket = OrderTicket();
               if(!findPending(ticket)) {
                  if(OrderSelect(ticket, SELECT_BY_TICKET) && (((TimeCurrent() <= (startTime + datePeriod * 3600))) || isStart)) {
                     if(OrderType() == OP_BUY) {
                        double sl_price = NormalizeDouble(OrderOpenPrice() - Point() * MathMax(stop_loss, MarketInfo(Symbol(), MODE_STOPLEVEL)), Digits);
                        double tp_price = NormalizeDouble((OrderOpenPrice() + Point() * (tp)), Digits);
                        if(!OrderModify(OrderTicket(), OrderOpenPrice(), sl_price, tp_price, OrderExpiration())) {
                           Print("Ошибка модификации ордера:", GetLastError());
                        } else {
                           if(stopLossCount < stop_count && tp_price != tp_price_old){
                              pending_ticket = OrderSend(Symbol(), OP_SELLSTOP, lots, sl_price, slippage, 0, 0, NULL, OrderTicket());
                              lastMagic = ticket;
                              isLimitOn = true;
                              if(isStart){
                                 startTime = TimeCurrent();
                                 isStart = false;
                              }
                              tp_price_old = tp_price;
                              stopLossCount++;                         
                           }
                        }
                     } else if(OrderType() == OP_SELL) {
                        double sl_price = NormalizeDouble(OrderOpenPrice() + Point() * MathMax(stop_loss, MarketInfo(Symbol(), MODE_STOPLEVEL)), Digits);
                        double tp_price = NormalizeDouble((OrderOpenPrice() - Point() * (tp)), Digits);
                        if(!OrderModify(OrderTicket(), OrderOpenPrice(), sl_price, tp_price, OrderExpiration())) {
                           Print("Ошибка модификации ордера:", GetLastError());
                        } else {
                          if(stopLossCount < stop_count && tp_price != tp_price_old){
                              pending_ticket = OrderSend(Symbol(), OP_BUYSTOP, lots, sl_price, slippage, 0, 0, NULL, OrderTicket());
                              lastMagic = ticket;
                              isLimitOn = true;
                              if(isStart){
                                 startTime = TimeCurrent();
                                 isStart = false;
                              }
                              stopLossCount++;
                              tp_price_old = tp_price;  
                          }
                        }
                     }
                  }
               }
         }
         if(startTime > 0 && (TimeCurrent() >= (startTime + datePeriod * 3600))){
            deletePending(lastMagic);
            isFinal = true;
         }
            
         if(lastMagic != 0 && !IsSell() && !IsBuy() && magic == lastMagic) {
            tpc = 0;
            startTime = 0;
            stopLossCount = 0;
            deletePending(lastMagic);
            isStart = true;
            }
         double GetPointLastLoss(){
            datetime t=0;
            double result=0,p=0,tp=0;
            int i=OrdersHistoryTotal();
         for(int pos=0; pos<i; pos++)
         {
          if(OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY))
         {
          if((OrderSymbol()==_Symbol) && (OrderMagicNumber()==Magic))
           {
            if(OrderType()==OP_BUY || OrderType()==OP_SELL)
              {
               if(t<OrderCloseTime())
                 {t=OrderCloseTime(); p=OrderProfit(); tp=OrderType();
                  if(tp==OP_BUY&&p<0)
                    {
                     result=OrderOpenPrice()-OrderClosePrice();
                    } else {result=0;}
                  if(tp==OP_SELL&&p<0)
                    {
                     result=OrderClosePrice()-OrderOpenPrice();
                    } else {result=0;}
                 }
              }
           }
        }
     }
   return(result);
  }
      }
     }
   }
   if((startTime > 0 || isFinal) && !IsSell() && !IsBuy()){
            tpc = 0;
            startTime = 0;
            stopLossCount = 0;
            isStart = true;
            isFinal = false;
   }
}                                                                
//+------------------------------------------------------------------+
bool findPending(int ticket) {
   for(int i = OrdersTotal() - 1; i >= 0; i--) {
      if(OrderSelect(i, SELECT_BY_POS)) {
         if(OrderMagicNumber() == ticket) {
            return true;
         }
      }
   }

   for(int i = OrdersHistoryTotal() - 1; i >= 0; i--) {
      if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
         if(OrderMagicNumber() == ticket) {
            return true;
         }
      }
   }
   return false;
}
//+------------------------------------------------------------------+
void deletePending(int magic) {
   for(int i = OrdersTotal() - 1; i >= 0; i--) {
      if(OrderSelect(i, SELECT_BY_POS)) {
         if(OrderMagicNumber() == magic) {
            if(OrderType() != OP_BUY && OrderType() != OP_SELL) {
               if(!OrderDelete(OrderTicket())) {
                  Print("Ошибка удаления отложеного одера: ", GetLastError());
               }
            }
            break;
         }
      }
   }
}
//+------------------------------------------------------------------+
bool IsSell()
{
   int count = 0;
   for (int trade = OrdersTotal () -1; trade >= 0; trade--)
   {
      if (OrderSelect (trade, SELECT_BY_POS, MODE_TRADES) 
          && OrderSymbol() == Symbol()
          && OrderType() == OP_SELL)
      {
         count++;
      }
      
   }
   if (count == 0)
      return false;
   else
      return true;
}
//+------------------------------------------------------------------+
bool IsBuy()
{
   int count = 0;
   for (int trade = OrdersTotal () -1; trade >= 0; trade--)
   {
      if (OrderSelect (trade, SELECT_BY_POS, MODE_TRADES) 
          && OrderSymbol() == Symbol()
          && OrderType() == OP_BUY)
      {
         count++;
      }
      
   }
   if (count == 0)
      return false;
   else
      return true;
}
 
SGarnov:
I tried to insert it, but it doesn't compile. I am exposing all the code, if necessary, I will show a screen of compilation. I also think that may be the problem, my Take order is set in relation to stop by coefficient (external variable), maybe it can be changed to manual setting and it will be easier for EA to add?
Does your EA follow manually placed orders?