I'm not sure what the limit is, but you can only use so many characters
Morteza Khorasani: I placed a text object on chart ... and the rest is not printed.
As @Keith Watford stated, there is a limit of 63 Characters (see following forum topic):
Forum on trading, automated trading systems and testing trading strategies
text objects has any limit size?
raider, 2009.05.02 18:01
Short answer: limit object names and text to a maximum of 63 characters.
This script builds off your example and shows what happens when you try to exceed 63 characters for the name or text:
#include <stdlib.mqh> int start() { // Works, no truncation WriteLN( "A", "NA1234567890123456789012345678901234567890123456789012345678901", // name = 63 Characters "TA1234567890123456789012345678901234567890123456789012345678901", // text = 63 Characters Red, 0, 50); // name is truncated to 63 characters, object can't be found when called with 64 character name WriteLN( "B", "NB12345678901234567890123456789012345678901234567890123456789012", // name = 64 Characters "TB1234567890123456789012345678901234567890123456789012345678901", // text = 63 Characters Yellow, 0, 100); // text is truncated to 63 characters WriteLN( "C", "NC1234567890123456789012345678901234567890123456789012345678901", // name = 63 Characters "TC12345678901234567890123456789012345678901234567890123456789012", // text = 64 Characters Lime, 0, 150); } void WriteLN(string trial, string name, string text, color clr, int xDist, int yDist) { if (ObjectFind(name)==-1) ObjectCreate(name, OBJ_LABEL, 0,0,0); Print(trial, "-Create: ", ErrorDescription(GetLastError())); ObjectSetText(name,text,10,"Courier New",Moccasin); Print(trial, "-SetText: ", ErrorDescription(GetLastError())); ObjectSet(name, OBJPROP_COLOR, clr); Print(trial, "-SetColor: ", ErrorDescription(GetLastError())); ObjectSet(name, OBJPROP_XDISTANCE, xDist); Print(trial, "-SetX: ", ErrorDescription(GetLastError())); ObjectSet(name, OBJPROP_YDISTANCE, yDist); Print(trial, "-SetY: ", ErrorDescription(GetLastError())); }
Fernando Carreiro:
As @Keith Watford stated, there is a limit of 63 Characters (see following forum topic):
Thank you
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello
I placed a text object on chart
But only a part of my text is shown on the chart. And it only occupies halp of the chart width.
ObjectSet(objname3, OBJPROP_XDISTANCE, x3);
ObjectSet(objname3, OBJPROP_YDISTANCE, y3);
ObjectSet("ObjName", OBJPROP_CORNER, 0);
ObjectSetText(objname3,"Running on wrong account. This Expert is only valid for Real account number: "+Demo1, 15, "Arial", clrDeepSkyBlue);
I have on the chart:
Running on wrong account. This Expert is only valid for Real ac
and the rest is not printed.