Questions from Beginners MQL4 MT4 MetaTrader 4 - page 69

 
Hello! Help me out with some advice. I have an EA written. It trades at the moment of important news release (high volatility). When I attach the Expert Advisor, I put all the checkboxes, everything is lit up, everything is smiling! The news passes - no movement, then I test it immediately on today's story - 1 to 3 trades. And so for a month and a half. My account is OK (trading is enabled). Price change parameter in the OrderSend function (slippage range) is 100(pips). In the "Journal" tab too, there is no movement. What else could be the problem?
 

There is a record in the code that is responsible for displaying the price marker on the chart

 double NLb=0;
   if(b>0)
     {
      NLb=NormalizeDouble(price_b/LB+TrailingStart*Point/b,Digits);
      if(DrawInfo)
        {
         ObjectCreate("infoБезубыток Buy",OBJ_ARROW,0,Time[0],NLb,0,0,0,0);
         ObjectSet("infoБезубыток Buy",OBJPROP_ARROWCODE,6);
         ObjectSet("infoБезубыток Buy",OBJPROP_COLOR,Blue);
        }
     }

People, please tell me how to increase its size ... It's too small as it is

I'm going blind with these charts)

 
Alexander Antoshkin:

There is a record in the code that is responsible for displaying the price mark on the chart

People, please tell me how to increase its size ... It's too small as it is

I'm blind with these charts)


ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);

The source - MQL4 Reference. Open it more often ;)
 
Alexander Antoshkin:

There is a record in the code which is responsible for displaying price marker on the chart

People, please tell me how to increase its size ... It's too small as it is

I've gone blind with these charts)

Instead of OBJ_ARROW, you'd better use OBJ_TEXT. You can set the anchor point (OBJ_ARROW may be cut for some reason), slope angle and font size.

‌// аналог OBJ_ARROW:

ObjectCreate(chartID,objectName,‌OBJ_TEXT,....);

ObjectSetString(objectName,OBJPROP_FONT,"Wingdings");

ObjectSetString(objectName,OBJPROP_TEXT,ShortToString(codeFromWingdings));‌

 
Vitalie Postolache:

ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);

The source - the MQL4 Handbook. Open it more often ;)

Usually, if the cat's a scientist, he goes to the left and tells tales to the right ...

open what? what handbook? i told you, i'm already blind with these charts)

double NLb=0;
   if(b>0)
     {
      NLb=NormalizeDouble(price_b/LB+TrailingStart*Point/b,Digits);
      if(DrawInfo)
        {
         ObjectCreate("infoБезубыток Buy",OBJ_ARROW,0,Time[0],NLb,0,0,0,0);
         ObjectSet("infoБезубыток Buy",OBJPROP_ARROWCODE,6);
         ObjectSet("infoБезубыток Buy",OBJPROP_COLOR,Blue);


          ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);

        }
     }

What next?

if you do not know, just be patient and do not answer!

 
Alexander Antoshkin:

There is a record in the code, which is responsible for displaying the price marker on the chart

People, please tell me how to increase its size ... It's too small as it is

I'm blind with these charts)

I do this.

//+------------------------------------------------------------------+
//| Функция выводит на экран правую ценовую метку                    |
//+------------------------------------------------------------------+
int Prn_r_price(string Name, datetime aTime, double aPrice, color CLR, int Width, int Window)
   {
      ObjectDelete(Name);
      ObjectCreate(Name,OBJ_ARROW_RIGHT_PRICE,Window,aTime,aPrice);
      ObjectSet(Name,OBJPROP_COLOR,CLR);//clrTeal
      ObjectSet(Name,OBJPROP_STYLE,STYLE_DASH);
      ObjectSet(Name,OBJPROP_WIDTH,Width);// Размер ценовой метки 
      ObjectSet(Name,OBJPROP_BACK,true);
      ObjectSet(Name,OBJPROP_RAY,true);
      //---
      return(0);
   } 

And here it is:

https://www.mql5.com/ru/docs/constants/objectconstants/enum_object/obj_arrow_right_price

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_ARROW_RIGHT_PRICE
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_ARROW_RIGHT_PRICE
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_ARROW_RIGHT_PRICE - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Alexander Antoshkin:

Usually if the cat's a scientist, he goes to the left singing to the right telling tales...

Open what? What handbook? I told you, I'm already blind with these charts)

What next?

if you don't know, just be patient and don't answer!


So you have enough intelligence to write caustic comments, but not enough to place the correct values into the function? And you can't even open the language reference?
 
Vitalie Postolache:

So you're smart enough to write caustic comments, but not smart enough to substitute the right values into a function? And you can't even open the language reference?

Why are they caustic?)

So it's called simple - no use for me, apparently I'm already blind, I don't catch mice anymore, I'm lazy ...

I make you read books.

 
Apparently ... There's no way to do it apart from creating an extra function...
 
Alexander Antoshkin:
Apparently yes ... There's no way to do it apart from creating an additional function...

You can do this without an extra function when creating a single label.

Just writing one line of code is much more convenient if you plan to do this for multiple labels.

Reason: