Hi, I am trying to use the display function on MT5, but I couldn't make it to work probably, main reason: ObjectSet, all help are welcome, thank you.
void Display(string text)
{
string labstr = "OAM-" + IntegerToString(displaycount);
string textpart[5];
int offset = 0;
uint w, h;
for (int cc = 0; cc < 5; cc++)
{
textpart[cc] = StringSubstr(text, cc * 63, 64);
if (StringLen(textpart[cc]) == 0) continue;
labstr = labstr + IntegerToString(cc);
if (ObjectFind(0, labstr) < 0)
{
ObjectCreate(0, labstr, OBJ_LABEL, 0, 0, 0);
ObjectSetInteger(0, labstr, OBJPROP_CORNER, 0);
ObjectSetInteger(0, labstr, OBJPROP_XDISTANCE, DisplayX + offset);
ObjectSetInteger(0, labstr, OBJPROP_YDISTANCE, DisplayY + displaycount * (int)(FontSize * 1.5));
ObjectSetInteger(0, labstr, OBJPROP_BACK, false);
}
//ObjectSet(labstr, textpart[cc], FontSize, FontName, Colour);
TextSetFont(FontName, (int)(-FontSize * 10), 0, 0);
TextGetSize(textpart[cc], w, h);
if (StringSubstr(textpart[cc], 63, 1) == " ") { offset+=(int)(w - FontSize * 0.3); }
else { offset += (int)(w - FontSize * 0.7); }
}
}
Help with Display function Empty4 to MT5
-
szfxtrader
- Trader
- Posts: 377
- Joined: Sun Feb 10, 2013 9:36 am
Return to “MQ5 Nuggets for the Dauntless”
Jump to
- Welcome
- Board admin messages
- Afterprime
- Funding our Forum. Tommaso needs our help.
- TDesk: A Thomas Special. The greatest trading tool ever.
- Automated trading systems
- ↳ Archived EA's
- ↳ EA's for Dummies.
- ↳ The demo/live money EA results forum
- ↳ Automated Loss Recovery
- ↳ Thingy Bob EA's
- ↳ Pipcruiser's Pipmasher forum
- ↳ Peaky forum
- ↳ Super Slope EA's
- ↳ Coordinated EA Testing Forum
- ↳ Moving Day
- ↳ Trendy Moving Day Adapted
- ↳ Trendy Monster Moving Day
- ↳ The Paycheck Project
- Manual trading systems
- ↳ Captain Jack's forum
- Utilities Indicators and Scripts
- ↳ Indicators
- ↳ Utilities
- ↳ Scripts
- Rene's stuff
- ↳ Auto-trading EA's and EA monitors
- ↳ Chart/template copying and history loading
- ↳ Clocks and calendars
- ↳ Data analysis tools
- ↳ Indicators and matrixes
- Nanningbob's Holy Grail Indicator forum
- ↳ Nanningbob 10.x
- ↳ Bob's individual forum
- ↳ Manual 10.x trading
- ↳ 10.x EA forum
- ↳ 10.x Indi forum
- ↳ 10.7 Auto Traders Forum
- BALUDA'S SUPER CSS-2.0. THE SIMPLEST TRADING SYSTEM EVER
- MQ5 Nuggets for the Dauntless
- Alternatives to Global Prime
- Coders Hangout
- ↳ Ideas for Possible Automation
- ↳ Coding Lessons - info for all
- Alternative platforms
- ↳ cTrader and cAlgo
- ↳ General discussion
- ↳ Indicators
- ↳ Robots
- ↳ JForex
- ↳ LMAX
- ↳ Tradable
- ↳ Protrader
- Know your MT4 platform
- General Forex Discussion
- ↳ Trading journals
- ↳ Finding a new platform
- ↳ Scam broker forum
- Trading Psychology & Money Management
- Macroeconomics and the Forex markets
- Newbie Discussion
- ↳ Automated trading (Rookies)
- ↳ General Discussion (Rookies)
- Lounge
- Commercial wares
- ↳ Beta testing groups
- ↳ Commercial stuff recommended by forum members
- ↳ Members' business to business
- ↳ Commercial EA's and Indi's etc
- ↳ VPS promotions
- ↳ INFINITE WEALTH