Questions from Beginners MQL5 MT5 MetaTrader 5 - page 153

 
barabashkakvn:
Look at the height of my chart and mine - they are different, so the indentation is different in each case.
Maybe somewhere in MT4 and MT5 there is an opportunity to set the distance from the top and bottom, so the quote chart will be stretched/stretched by itself?
 
kon12:

Repeated the picture in mine and this is what I got

The question is why I don't have the same picture as you. The scale is the same. I do not like it because I work with MT4, the indentation is the same for top and bottom. My indicator puts text marks on the chart for high and low. It looks fine on the tablet. But on MT5 on the tablet the indent at the bottom eats up 10% of the chart space. It is unpleasant on a small screen.

If you have a trading robot and do not know how to use it, do not hesitate to contact the Service Desk:

Forum on trading, automated trading systems and testing trading strategies

Questions from Beginners

paladin800, 2013.11.11 21:49

Maybe somewhere in MT4 and MT5 there is a possibility to set the distance from top and bottom so the quote chart will be stretched/stretched by itself?

If you have a clear understanding of the man with the right hand, you may be able to use it to achieve the required accuracy, yet you will have to do it right away.

Developers often implement reasonable user suggestions.

 

Can you tell me how to determine the type of a pending order, and then make further moves depending on its type.

For example, I can only have BUY_STOP or SELL_STOP.

I do the following in my EA:

// Если нет открытых позиций то закрываем отложные ордера!
  {
   ulong order_ticket;
//--- пройдем по всем отложенным ордерам
   for(int i=OrdersTotal()-1;i>=0;i--)
      if((order_ticket=OrderGetTicket(i))>0)
         //--- ордер с подходящим ORDER_MAGIC
         if(Mag2==OrderGetInteger(ORDER_MAGIC))
         
         if (PositionsTotal()<1) // открытых позиций нет?
         {
            MqlTradeResult result={0}; // удаляем отложные ордера!!
            MqlTradeRequest request={0};
            request.order=order_ticket;
            request.action=TRADE_ACTION_REMOVE;
            OrderSend(request,result);
            //--- выведем в лог ответ сервера  
            Print(__FUNCTION__,": ",result.comment," код ответа ",result.retcode);
           
         }else { 
                   type          =EnumToString(ORDER_TYPE);   // Устанавливаем тип отложного ордера
                   Print("ОРДЕР type =" , type );
                   
                   if (type == ORDER_TYPE_BUY_STOP && BezUbitok>0 && bool (mrate[1].close < BBMidle[1]) ) 
                  {
                   ModificationPosition_BUY_STOP (); // модифицируем ордер BUY_STOP
                  }
                   if (type == ORDER_TYPE_SELL_STOP && BezUbitok>0 && bool (mrate[1].close > BBMidle[1]) ) 
                  {
                   ModificationPosition_SELL_STOP (); // модифицируем ордер SELL_STOP
                  }
                   
              }     
               
  }  

After trying to determine the type type =EnumToString(ORDER_TYPE); // Set the type of the pending order

I check it just in casePrint("ORDER type =", type );

I see in the log: 2013.11.12 17:42:09 Core 1 2006.06.21 13:00:00 ORDER type =ORDER_TYPE

I.e.ORDER_TYPE typeand what is it SELL_STOPorBUY_STOP how do I determine?

Or am I doing something wrong?)

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
papaklass:

Try the line

Replace it with.

In this case, the log gives numerical values:

2013.11.12 19:08:32 Core 1 2008.04.22 10:00:07 ORDER type =5
2013.11.12 19:08:31 Core 1 2007.08.17 14:00:00 ORDER type =4

Maybe 4 is BUY_STOP and 5 is SELL_STOP

But they should be numbered 5 and 6, this is nonsense).

https://www.mql5.com/ru/docs/constants/tradingconstants/orderproperties#enum_order_type

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
papaklass:

Here is a printout of the script:

And the script code:

Thank you!

Assumed that ORDER_TYPE_BUY should be = 1.)

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 

How long before I start distributing my settings to other users?

 
Kirillos:

how long will it take me to start distributing my settings to other users?

You probably meant to ask: "...give away your resources..." with the MetaTrader 5 Strategy Tester? Basically, it all depends on the rating (PR) your agents got. With PR below 120 there will be not many tasks per day - the approximate total load per day is about 10 minutes.

Go to your profile on mql5.com and select the agents tab(https://www.mql5.com/ru/users/kirillos/agents/list), there you can see your agents' rating.

 
is there a sharps analogue? or how to make one?
 

Where is the one missing?

   int dig=_Digits-1;
   double max=NormalizeDouble(1.33182,dig);//Мах на всем участке 
   double min=NormalizeDouble(1.30492,dig);//Мин на всем участке
   //double max=1.3318;
   //double min=1.3049;
   int mm=(int)((max-min)*pow(10,dig))+1;
   Alert(max," ",min," ",mm);

If you use commented out strings, it's correct. As it is, it's 1 less.

This construction produces13317 , not 13318 .Is it my mistake or MT?

Alert(int(max*10000));
 
Rorschach:

Where is the one missing?

If you use commented out strings, it's correct. As it is, it's 1 less.

This construction produces13317 , not 13318 .Is it my mistake or MT?

So you need to get 1.33182 to get 1.3318? Do you just need to discard the 5th digit after the decimal point or round up to the 4th digit, i.e. from 1.33186 you need 1.3318 or 1.3319?