Anyone able to give me some help on this

Hi All,

I think I have a drawing problem with my indicator. Works perfectly on my MT4 but doesnt on other peoples. cant suss it out any tips?

Where as on other peoples it does this without the labels:

My Code Draws these labels using this code: and the Show Stochlabels is fixed to True in the variables so its not user input errors thought it was so locked it and still got the same problem. Thinking it could be by using the WindowFind but i didnt want to use Window Index incase someone wants to use it with other indicators it will mess it up otherwise

if(Show_StochLabels==true)
     {
      ObjectCreate("stoLABEL", OBJ_LABEL,WindowFind("BigBroking MTF STOCH #1 "), 0, 0);
      ObjectSetText("stoLABEL","STOCH #1 :   "+STF1+"", 9, "Tahoma Narrow", indicator_color1);
      ObjectSet("stoLABEL", OBJPROP_CORNER, 0);
      ObjectSet("stoLABEL", OBJPROP_XDISTANCE, 1165+Shift_Text);
      ObjectSet("stoLABEL", OBJPROP_YDISTANCE, 5);
//----
      ObjectCreate("stoLABEL1", OBJ_LABEL,WindowFind("BigBroking MTF STOCH #1 "), 0, 0);
      ObjectSetText("stoLABEL1","STOCH #2 :   "+STF2+"", 9, "Tahoma Narrow", indicator_color3);
      ObjectSet("stoLABEL1", OBJPROP_CORNER, 0);
      ObjectSet("stoLABEL1", OBJPROP_XDISTANCE, 1165+Shift_Text);
      ObjectSet("stoLABEL1", OBJPROP_YDISTANCE, 20);
//----
      ObjectCreate("stoLABEL2", OBJ_LABEL,WindowFind("BigBroking MTF STOCH #1 "), 0, 0);
      ObjectSetText("stoLABEL2","STOCH #3 :   "+STF3+"", 9, "Tahoma Narrow", indicator_color5);
      ObjectSet("stoLABEL2", OBJPROP_CORNER, 0);
      ObjectSet("stoLABEL2", OBJPROP_XDISTANCE, 1165+Shift_Text);
      ObjectSet("stoLABEL2", OBJPROP_YDISTANCE, 35);
//----
      ObjectCreate("stoLABEL4", OBJ_LABEL,WindowFind("BigBroking MTF STOCH #1 "), 0, 0);
      ObjectSetText("stoLABEL4","STOCH #4 :   "+STF4+"", 9, "Tahoma Narrow", indicator_color7);
      ObjectSet("stoLABEL4", OBJPROP_CORNER, 0);
      ObjectSet("stoLABEL4", OBJPROP_XDISTANCE, 1165+Shift_Text);
      ObjectSet("stoLABEL4", OBJPROP_YDISTANCE, 50);
//----
      ObjectCreate("stoLABEL5", OBJ_LABEL,WindowFind("BigBroking MTF STOCH #1 "), 0, 0);
      ObjectSetText("stoLABEL5","STOCH #5 :   "+STF5+"", 9, "Tahoma Narrow", indicator_color9);
      ObjectSet("stoLABEL5", OBJPROP_CORNER, 0);
      ObjectSet("stoLABEL5", OBJPROP_XDISTANCE, 1165+Shift_Text);
      ObjectSet("stoLABEL5", OBJPROP_YDISTANCE, 65);
     }

Possibly off the edge of their screen (to the right).

You would be better to anchor it to the other side (OBJPROP_ANCHOR)

If they open the Object List can they see the objects listed?

You might just need to use ChartSetInteger to set chart objects to show. Here’s a script to toggle it on and off to see if you can replicate the objects not shoeing on the screen.

//+------------------------------------------------------------------+
//|                                   ChartObjDescriptionsON_OFF.mq5 |
//|                                                      nicholishen |
//|                                   www.reddit.com/u/nicholishenFX |
//+------------------------------------------------------------------+
#property copyright "nicholishen"
#property link      "www.reddit.com/u/nicholishenFX"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   long value;
   
   ResetLastError(); 
//--- receive the property value 
   if(!ChartGetInteger(ChartID(),CHART_SHOW_OBJECT_DESCR,0,value)) { 
      //--- display the error message in Experts journal 
      Print(__FUNCTION__+", Error Code = ",GetLastError()); 
      return; 
   } else {
      Print("Chart was displaying Objects = ",valueToString(value));
   } 

   value = value == true ? value = false : value = true;

   if(!ChartSetInteger(ChartID(),CHART_SHOW_OBJECT_DESCR,0,value)) { 
      //--- display the error message in Experts journal 
      Print(__FUNCTION__+", Error Code = ",GetLastError()); 
      return; 
   } else {
      Print("Chart is now displaying Objects = ",valueToString(value));
   }
}
//+------------------------------------------------------------------+

string valueToString(const long value){
   if(value == true)return "TRUE";
   else if( value == false)return "FALSE";
   else return "ERROR";
}

Your code is doing something a little different.

CHART_SHOW_OBJECT_DESCR controls whether the description of an object is visible, not the object itself.

It is controlling this:

Example:


By the way, you can simplify this:

value = value == true ? value = false : value = true;

To this:

value = !value;