Posicionar un texto en el borde derecho de la pantalla

Spezifikation

Logré crear un indicador que muestra una línea en los niveles comerciales High y Low del día anterior y en la apertura del día actual, intenté añadirle un texto que defina la línea pero por mas que lo intento no logro posicionar el texto en el lugar deseado (el borde derecho de la ventana) (ver imagen adjunta). El texto sí se dibuja pero se posiciona en el tiempo actual del eje X. 

// Añadir texto para el high del día anterior
      if (ObjectFind(0, highTextName) == -1)
      {
         if (!ObjectCreate(0, highTextName, OBJ_TEXT, 0, TimeCurrent(), previous_high))
         {
            Print("Error al crear el texto del máximo del día anterior");
         }
         else
         {
            ObjectSetString(0, highTextName, OBJPROP_TEXT, "HD");
            ObjectSetInteger(0, highTextName, OBJPROP_COLOR, clrTeal);
            ObjectSetInteger(0, highTextName, OBJPROP_FONTSIZE, 8);
         }

// Añadir texto para el low del día anterior
      if (ObjectFind(0, lowTextName) == -1)
      {
         if (!ObjectCreate(0, lowTextName, OBJ_TEXT, 0, TimeCurrent(), previous_low))
         {
            Print("Error al crear el texto del mínimo del día anterior");
         }
         else
         {
            ObjectSetString(0, lowTextName, OBJPROP_TEXT, "LD");
            ObjectSetInteger(0, lowTextName, OBJPROP_COLOR, clrTeal);
            ObjectSetInteger(0, lowTextName, OBJPROP_FONTSIZE, 8);
         }

// Añadir texto para la apertura del día actual
      if (ObjectFind(0, openTextName) == -1)
      {
         if (!ObjectCreate(0, openTextName, OBJ_TEXT, 0, TimeCurrent(), current_open))
         {
            Print("Error al crear el texto de la apertura del día actual");
         }
         else
         {
            ObjectSetString(0, openTextName, OBJPROP_TEXT, "OD");
            ObjectSetInteger(0, openTextName, OBJPROP_COLOR, clrYellow);
            ObjectSetInteger(0, openTextName, OBJPROP_FONTSIZE, 8);
         }

   // Obtener el ancho del gráfico en píxeles
   long chartWidth = ChartGetInteger(0, CHART_WIDTH_IN_PIXELS);

   // Coordenadas de la línea del High
   int high_x = 0, high_y = 0;
   if (ChartTimePriceToXY(0, 0, TimeCurrent(), HighLineBuffer[0], high_x, high_y))
   {
      high_x = MathMin((int)chartWidth - 10, high_x); // Ajustar posición X
      ObjectSetInteger(0, highTextName, OBJPROP_XDISTANCE, (int)chartWidth - high_x - 10); // Ajustar posición X
      ObjectSetInteger(0, highTextName, OBJPROP_YDISTANCE, high_y);
   }

   // Coordenadas de la línea del Low
   int low_x = 0, low_y = 0;
   if (ChartTimePriceToXY(0, 0, TimeCurrent(), LowLineBuffer[0], low_x, low_y))
   {
      low_x = MathMin((int)chartWidth - 10, low_x); // Ajustar posición X
      ObjectSetInteger(0, lowTextName, OBJPROP_XDISTANCE, (int)chartWidth - low_x - 10); // Ajustar posición X
      ObjectSetInteger(0, lowTextName, OBJPROP_YDISTANCE, low_y);
   }

   // Coordenadas de la línea de Apertura
   int open_x = 0, open_y = 0;
   if (ChartTimePriceToXY(0, 0, TimeCurrent(), OpenLineBuffer[0], open_x, open_y))
   {
      open_x = MathMin((int)chartWidth - 10, open_x); // Ajustar posición X
      ObjectSetInteger(0, openTextName, OBJPROP_XDISTANCE, (int)chartWidth - open_x - 10); // Ajustar posición X
      ObjectSetInteger(0, openTextName, OBJPROP_YDISTANCE, open_y);
   }

   return rates_total;
}



¿Alguien tiene alguna idea de como podría mejorar esto?



Bewerbungen

1
Entwickler 1
Bewertung
(475)
Projekte
537
33%
Schlichtung
27
41% / 44%
Frist nicht eingehalten
8
1%
Überlastet
2
Entwickler 2
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
3
Entwickler 3
Bewertung
(159)
Projekte
272
25%
Schlichtung
14
29% / 7%
Frist nicht eingehalten
18
7%
Beschäftigt
4
Entwickler 4
Bewertung
(55)
Projekte
79
19%
Schlichtung
3
0% / 0%
Frist nicht eingehalten
1
1%
Arbeitet
5
Entwickler 5
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
6
Entwickler 6
Bewertung
(126)
Projekte
160
42%
Schlichtung
20
60% / 20%
Frist nicht eingehalten
9
6%
Beschäftigt
Ähnliche Aufträge
Hola! Estoy buscanco generar un EA que funcione en MT5. En base a un rango horario determinado, tiene que generar un rango, y en base a este rango abrir una operacion con un SL determinado. el TP y el RR deben ser determinados por el usuario. solo abrira una operacion por activo
Busco un programador en Metatrade 4 que pueda crear un EA (asesor experto) de noticias que pueda crear un sistema donde pueda establecer mis preferencias de noticias en bajo, medio o alto. También debe tener una opción de encendido y apagado, para que uno pueda elegir si quiere trabajar con noticias o no. Tener la opción de no operar 15 minutos antes en la divisa de la noticia o no operar todo el robot. También tiene
Hiring MQL5 Programmer Job Description: We are seeking a full-time MQL5 programmer to join our team. The successful candidate will work closely with me on a range of projects, including the development and correction of trading algorithms and formulas. The work schedule is from 11 am to 5 pm, Mexico time (UTC-6). Responsibilities: Develop and optimize trading bots in MT5. Implement artificial intelligence and machine
Hola, soy programador y tengo un problema con el bot, consegui todo menos que logre leer bien las señales de compra o de venta de mi .txt, entonces necesito ayuda para hacer funcionar al bot

Projektdetails

Budget
30+ USD

Kunde

Veröffentlichte Aufträge1
Anzahl der Schlichtungen0