Questions from Beginners MQL4 MT4 MetaTrader 4 - page 208

 

Can you tell me who I can contact to help me install the software on my computer or can I do it from a web terminal?

i'm new here can someone please help me?

Or tell me who to contact?

Вебтерминал для MetaTrader 5
Вебтерминал для MetaTrader 5
  • www.mql5.com
Подключайтесь к счету и торгуйте на финансовых рынках прямо из браузера
 

I don't know if this is the right place to write, but here's the situation in general. I don't know a thing about programming.


An acquaintance bought an mt4 advisor for trading on olympus, in auto mode. I have noticed that the EA is tied to a virtual machine on Yandex cloud or somewhere else. If I try to use one account on which I have several machines, I trade on it, it always requires verification. If I trade alone, I get output without problems, but if I try to go to his address, which he sends me a password and a login, I have another situation. What does this have to do with ? Do I have to watch my cookies more carefully, maybe I should change some settings in the router, or do I need a new bought EA with a virtual machine ?

 
Юлия Кузубова:

Can you tell me who I can contact to help me install the software on my computer or can I do it from a web terminal?

i'm new here can someone please help me?

Or tell me who to contact?

Yulia, I think you've just been scammed before... No one calls and explains how to install the trading platform - it installs itself very easily.

 
Microslonik:

I don't know if this is the right place to write, but here's the situation in general. I don't know a thing about programming.


An acquaintance bought an mt4 advisor for trading on olympus, in auto mode. I have noticed that the EA is tied to a virtual machine on Yandex cloud or somewhere else. If I try to use one account on which I have several machines, I trade on it, it always requires verification. If I trade alone, I get output without problems, but if I try to go to his address, which he sends me a password and a login, I have another situation. What does this have to do with ? Do I have to watch my cookies more carefully, maybe I should change some settings in the router or I just bought a new EA with a virtual machine ?

It's like a miracle. Probably not a question for this resource at all.

 

Good afternoon!

Dear programmers, could you tell me how to implement candlestick counting in a certain channel? Here is the code:

extern string Symbol3 = ""; //Инструмент (""текущий по умолчанию)
extern int P=5;          //Таймфрейм


#include <ChartObjects\ChartObjectsLines.mqh>


CChartObjectHLine hLine, lowLine;

double   PRH=0;
double   PRL=0;

int OnInit() 
{
lowLine.Create(0, "lowLine", 0, 0);
lowLine.Color(clrDarkViolet); 
hLine.Create(0, "hLine", 0, 0);
hLine.Color(clrDodgerBlue);
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason) {
}

int start()
{

double ATR1=MathAbs(iATR(NULL,P,1,1))/Point;


if (ATR1>=100)
{
double   h1 = iHigh(NULL, PERIOD_CURRENT, 1);  // условие образования уровней
double   l1 = iLow(NULL, PERIOD_CURRENT, 1);
}


if (ATR1>=100) // установление уровней
{
PRH = h1; // то это будет уровень max
hLine.Price(0, PRH);

PRL = l1; // то это будет уровень min
lowLine.Price(0, PRL);
}




if ((Close[1]<=PRH)&&(Close[1]>=PRL)) // ??? Условие отсчёта свечей
{
datetime some_time=TimeCurrent();
int k=iBarShift("",PERIOD_CURRENT,some_time);
}


Comment ("КОЛЛИЧЕСТВО СВЕЧЕЙ В КАНАЛЕ =================: ",k,"\n");

return(0);
}

What is needed: to have candlestick counting inside the channel. And as soon as the price goes out of the channel, the counter is reset to zero.

 

And the solution is very simple:


if ((Close[1]<=PRH)&&(Close[1]>=PRL))
{
int k=iBarShift("",P,some_time); 
}
else
{
PRH=0;
PRL=0;
}

Comment ("КОЛЛИЧЕСТВО СВЕЧЕЙ В КАНАЛЕ =================: ",k,"\n");

So the question is now irrelevant.
 

Good afternoon!


Can you please advise if anyone has encountered this problem?

MT5 Tester, Multicurrency Expert Advisor. When in the tester I select the major currency pair with a 5-digit quote (EURUSD, AUDUSD, etc.), the pair that is attached to the multicurrency Expert Advisor USDJPY, GBPJPY, i.e. with a 3-digit quote starts working incorrectly, i.e. trades are opened incorrectly using a 3-digit pair, not like when choosing a major 3-digit pair in the tester. In this case everything is normal.



Here is the code (I put only one function to buy Buy2() to sell similar)


void  OnInit()
  {
    hig4= iCustom("USDJPY",CP,"Examples\\1",Length);
   hig5= iMA("USDJPY",CP,1,SHIFT,MODE_SMA,PRICE_HIGH);
   hig6= iMA("USDJPY",CP,1,SHIFT,MODE_SMA,PRICE_LOW);
}

void OnTick()
  {
CopyBuffer(hig6,0,0,2,ss211);
        CopyBuffer(hig5,0,0,2,ss111);
        CopyBuffer(hig4,0,0,3,ss11);

  if(OrderSelect(Bticket100,SELECT_BY_TICKET==true)&&OrderCloseTime()==0)
        {
         if(ss211[0]<ss11[0]&&(ss111[0]+L*_Point)<ss11[0]&&b1==1)
           {
            Sell0();
            c1=1;
            b1=0;
           }
         if((ss211[0]-n*_Point)>ss11[0]&&ss111[0]>ss11[0]&&c1==1)
           {
            trade.PositionClose(Bticket1002);
            Buy1();
            OrderSelect(Bticket1002,SELECT_BY_TICKET,MODE_HISTORY);
            n11=(OrderProfit()+OrderSwap()+OrderCommission())+n11;
            b1=1;
            c1=0;
           }
        }
      else
        {
         if(ss211[0]<ss11[0]&&(ss111[0]+L*_Point)<ss11[0])
           {
            a1=1;
           }
         if((ss211[0]-n*_Point)>ss11[0]&&ss111[0]>ss11[0]&&a1==1)
           {
            Buy2();
            b1=1;
            a1=0;
           }
        }

void Buy2()
  {
   int MagicNumber=3;
   trade.SetExpertMagicNumber(MagicNumber);
   double volume=LOTLOT;         
   string symbol="USDJPY";     
   int    digits=(int)SymbolInfoInteger(symbol,SYMBOL_DIGITS);  
   double point=SymbolInfoDouble(symbol,SYMBOL_POINT);       
   double bid=SymbolInfoDouble(symbol,SYMBOL_BID);             
   double SL=0;                                
   SL=NormalizeDouble(SL,digits);                              
   double TP=0;                                  
   TP=NormalizeDouble(TP,digits);                               
   double open_price=SymbolInfoDouble(symbol,SYMBOL_ASK);
   if(!trade.Buy(volume,symbol,open_price,SL,TP,comment))
     {
          Print("Метод Buy() выполнен успешно. DIGITS=",digits);
     }
   else
     {  
     }
   Bticket100 = trade.ResultOrder();
  }

 
Xopb:

Good afternoon!


Can you please advise if anyone has encountered this problem?

MT5 Tester, Multicurrency Expert Advisor. When in the tester I select the main pair with a 5-digit quote (EURUSD, AUDUSD, etc.) then the pair that is attached to the multicurrency Expert Advisor USDJPY, GBPJPY, i.e. with a 3-digit quote starts working incorrectly, i.e. trades are opened incorrectly using a 3-digit pair, not like when I select a 3-digit main pair in the tester. In this case everything is normal.



Here is the code (I have only one function to buy Buy2() to sell similar ones)

Your code should not work in principle.

Read the manual: OrderSelect- do not confuse between activepending ordersand positions that are also displayed in the "Trade" tab of the "Toolbox" panel of the client terminal.

In other words, Order Select is a function for working with Pending Orders and not with POISONS.

Документация по MQL5: Торговые функции / OrderSelect
Документация по MQL5: Торговые функции / OrderSelect
  • www.mql5.com
Выбирает ордер для дальнейшей работы с ним. Возвращает true при успешном завершении функции. Возвращает false при неудачном завершении функции. Чтобы получить информацию об ошибке, необходимо вызвать функцию GetLastError(). Не следует путать между собой действующие отложенные ордера и позиции, которые также отображаются на вкладке "Торговля" в...
 
Vladimir Karputov:

Your code should not work in principle.

Read the manual: OrderSelect- Do not confuse activepending ordersand positions, which are also displayed in the "Trade" tab of the "Tools" panel of the client terminal.

The OrderSelect function is intended for working with Pending Orders but not with POPS.

Vladimir, thank you! I have #include <MT4Orders.mqh> plugged in. It works fine - maybe the code is very messy, but it's not for real account. I do not understand why any pair set in the tester works properly only for 3-digit pairs embedded into multicurrency EA. As soon as I set a 5-digit pair it also works, but opens at different (adjacent) prices, i.e. the working principle is violated, what could be the reason?

 
Xopb:

Vladimir, thank you! I have #include <MT4Orders.mqh> plugged in. It works fine - maybe the code is very messy, but it is not for real account. I do not understand why any pair set in the tester works properly only for 3-digit pairs embedded into multicurrency EA. IfI set a 5-digit pair it also works, but opens at different (adjacent) prices, i.e. the working principle is violated.

In this case write in the section for the old terminal. If you use third-party libraries you will never rebuild your brain and will always be trapped by the old terms and concepts.

This is a forum of pure MQL5.


Multisymbol MQL5 Expert Advisors work perfectly. There is no difference whether it is two, three or five characters. But you continue to believe in conspiracy theories and continue to sit on the sidelines of technological progress.

Reason: