Download MetaTrader 5

ObjectSetText why not to set the description?

To add comments, please log in or register
All articles are available from MetaTrader 5. Contribute your own one!
ttechnik
256
ttechnik 2014.02.09 21:14 
string comnts="Buy Calculated lots: 18.27  Loss: 13483 $ (2.04%)  Margin: 12456 $";
ObjectSetText("TradeMessageLotBuy",comnts, 8, "Tahoma", Lime); 
error=GetLastError(); 

if comnts="333333", then set description.

In the old version, this working good. In 600, not.

And

the most interesting thing that

error is 0 !

Keith Watford
Moderator
9599
Keith Watford 2014.02.09 22:03  
ttechnik:

if comnts="333333", then set description.

In the old version, this working good. In 600, not.

What does

if comnts="333333", then set description

mean?

ttechnik
256
ttechnik 2014.02.09 22:09  
GumRai:

What does

if comnts="333333", then set description

mean?


not set to label's description this:
"Buy Calculated lots: 18.27  Loss: 13483 $ (2.04%)  Margin: 12456 $"
ttechnik
256
ttechnik 2014.02.10 08:56  
ttechnik:

not set to label's description this:

No one has any idea what is happening?
Simon Gniadkowski
Moderator
17998
Simon Gniadkowski 2014.02.10 10:02  
ttechnik:

No one has any idea what is happening?
Please post working code so that others can reproduce your issue and investigate it.
ttechnik
256
ttechnik 2014.02.10 10:28  
wrong:
string comnts="Buy Calculated lots: 18.27  Loss: 13483 $ (2.04%)  Margin: 12456 $";

good, it can enter this:
string comnts="Buy Calculated lots: 0.01  Loss: 4 $ (0.00%)  Margin: 7 $";
RaptorUK:
Please post working code so that others can reproduce your issue and investigate it.


I attached it.

Please probe it.

Files:
Simon Gniadkowski
Moderator
17998
Simon Gniadkowski 2014.02.10 10:49  
ttechnik:

I attached it.

Please probe it.


OK, it seems that ObjectSetText() no longer does what it used to do . . .

You can use . . .

ObjectSetString(0, "TradeMessageLotBuy" ,OBJPROP_TEXT ,"MinProfit:        %");  

. . . instead.

PLease report this to the Service Desk

ttechnik
256
ttechnik 2014.02.10 13:35  
RaptorUK:


OK, it seems that ObjectSetText() no longer does what it used to do . . .

You can use . . .

. . . instead.

PLease report this to the Service Desk


I send it
Simon Gniadkowski
Moderator
17998
Simon Gniadkowski 2014.02.10 13:36  
ttechnik:

I send it
Thank you
ttechnik
256
ttechnik 2014.02.10 14:46  
RaptorUK:
Thank you


They said:


63 characters without zero terminating

Without??? Why not generated error?

To add comments, please log in or register