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

 
I have a tester in mt4. i can add an indicator, run the tester and look at the chart movements on the screen, press pause, draw a line, cross, arrow, check mark and press start again. i need it as a training tool for those who trade by hand. in mt5 you can't add anything to the chart, not even a little arrow to indicate where i'd buy or sell. the question is how to fix the problem. maybe it all exists but somehow masked?
 
Artyom Trishkin #:

Vitaly can read and download files. Or do you consider the help to be bullying?

No, Artem, you do not, I know that you are doing everything right. Your articles are correct and competent, I have understood arrays and working with them, as well as indexing of parameters' values thanks to you. Thank you from the bottom of my heart - everything is OK!

 
Valeriy Yastremskiy #:

We communicate by post, in case someone tests it and shows mistakes))))

I see )
 

Good afternoon!!!!

Please help me to change a function which calculates only losses of unprofitable orders in a grid of orders

//+----------------------------------------------------------------------------+
//| Калькуляция убыточных ордеров                                              |
//+----------------------------------------------------------------------------+
double Loss()
  {
   double oLoss = 0;
   for(int i = OrdersTotal()-1; i>=0; i--)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
        {
         if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
           {
            if(OrderType() == OP_BUY || OrderType() == OP_SELL)
              {
               if(OrderProfit()<0)
                 {
                  oLoss += OrderProfit();
                 }
              }
           }
        }
     }
   return(oLoss);
  }

We need to change the function which calculates only minimum lot size from each order in the net of orders. Min Lot=0.01

Thanks!!!!

 
Valeriy Yastremskiy #:

It looks like it should work. Haven't tested it.

Drawing logic. I don't control levels, I draw again and below price, if in Buy I draw in grey, above in blue, in Sell, if above price level, it is grey, below in red.

Yes, I forgot to remove levels.)))

Thanks!

Helped!

 
Can you tell me where these subscribers are coming from on the main account page?


friend requests are all approved... the number of subscribers is different on the signals...
how are these subscribers appearing and where are they coming from?
 

If you're all concerned about withdrawal, then you're making money in the market, is that logical?

Then you must know the formula.

for example a ruble deposit

CHFJPY open long

entry 125.695 stop 125.421 lot 0.01 leverage 40

my question is how to calculate risk and margin in rubles

Please write formula

CHFJPY - Swiss Franc vs Yen - Курс валют сегодня — Форекс курсы валют
CHFJPY - Swiss Franc vs Yen - Курс валют сегодня — Форекс курсы валют
  • www.mql5.com
CHFJPY - Swiss Franc vs Yen - Графики с курсом по самым популярным валютным парам. Используйте фильтр снизу, чтобы отбирать нужные вам курсы валют. Внутри каждого графика показываются цены спроса и предложения, а также прирост за день.
 

Can you please tell me how to null an array[10,10,10]?

I want all values in all indexes to be 0.

 
Ivan Butko #:

Can you please tell me how to null an array[10,10,10]?

To make all values of all indexes become 0.

I can'tdo it like this?

ZeroMemory - Общие функции - Справочник MQL4
ZeroMemory - Общие функции - Справочник MQL4
  • docs.mql4.com
ZeroMemory - Общие функции - Справочник MQL4
 
Ivan Butko #:

Can you please tell me how to null an array[10,10,10]?

I want all values in all indexes to be 0.

For example, ZeroMemory().
Документация по MQL5: Общие функции / ZeroMemory
Документация по MQL5: Общие функции / ZeroMemory
  • www.mql5.com
ZeroMemory - Общие функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Reason: