Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1455

 
qadexys creating a custom symbol and comparing values with it; use of a database. Can you tell me what solution would be optimal, maybe someone who has solved such a problem?

So is not it logical to calculate the value of the indicator by OHLC and already save them?

In general, the idea is a failure to work with OHLC indicator values on the zero bar.
 
MrBrooklin #:

Your question is not clear. First, clarify your question:

  1. Are we talking about already existing functions in MQL5?
  2. Is there a function in the set of ready-made functions in MQL5, but it does not work?
  3. Do you need a certain function, but there is no such function in the set of ready-made MQL5 functions?
Regards, Vladimir.
We are talking about existing default functions such as TimeHour(), ErrorDescription() and FILLING_FOK.
 
Baruandreas #:
We are talking about existing default functions such as TimeHour(), ErrorDescription() and FILLING_FOK.

You have already heard about TimeHour() in another thread. A whole library has been created for ErrorDescription(). About FILLING_FOK you can find it in the Documentation section at the request ORDER_FILLING_FOK or SYMBOL_FILLING_FOK.

Regards, Vladimir.

 
Ошибки, баги, вопросы - Включите форвард-тестирование.
Ошибки, баги, вопросы - Включите форвард-тестирование.
  • 2023.04.13
  • www.mql5.com
В режиме двух окон в горизонт положении смартфона нет кнопки. То есть если телефон в кредле в горизонтальном режиме и нужно выключить курсор. Вызвать боковую панель кликом по соседнему окну и там отключить курсор тоже не получается
 

Help me understand.

Why the line SetIndexStyle(0, DRAW_LINE); gives two errors:

',' - unexpected token

')' - unexpected token

 
Hi, could you help me work on this?

 
vitaliy zamkovoy #:

Help me figure this out.

Why the line SetIndexStyle(0, DRAW_LINE); gives two errors:

',' - unexpected token

')' - unexpected token

SetIndexStyle - MQL4.

IN MQL5:

#property indicator_type1   DRAW_LINE
#property indicator_type2   DRAW_NONE
 
trader6_1 #:

SetIndexStyle - MQL4.

IN MQL5:

Thank you!
 

A question has been on my mind for a long time, what is the difference

Right click on a function, variable, class member or structure, the first 2 lines will drop down: Go to definition and Go to declaration, I have many thousands of pages of code in 10 files, and as often as I clicked always in the same place the cursor is moved to the same place

what is this functionality on the right button in the first lines?

 

Good afternoon!

Please help: the goal is to implement position closing when the price crosses MA.

In this code section

if(Bid<iMA(Symbol(),0,Fast_Ma_Period,Fast_Ma_Shift,Fast_Ma_Method,Fast_Ma_Price,0) && CountBuy()>0)
          
           
     {
     for(int i=OrdersTotal ()-1; i>=0; i--)
     {
     if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
     {
       if (OrderMagicNumber ()== MagicNumber && OrderType() == OP_BUY)
       if(!OrderClose(OrderTicket(), OrderLots(),Bid, Slippage, Black))
       Print("Ошибка");

I get the following picture on the tester : the price crosses the MA and closes the position at the closing of the candle / opening of the next candle, already far from the desired closing level (MA boundary)....

Files: