fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    ObjectSet function on MQL5

    Questions & Answers
    2
    3
    2535
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rafaelgrecco last edited by rafaelgrecco

      Hi,

      I use some custom MQL code to change the property of some objects on MQL4, but I can't get it to work on MQL5.

      For example, I use: ObjectSet(LoadedObjectName(),OBJPROP_BGCOLOR,clrDarkGray); to change the color of a button on MQL4 to Dark Gray, but it doesn't work on MQL5.

      I also use ObjectSet(LoadedObjectName(),OBJPROP_STATE,0); to change the state of a button on MQL4. It doesn't work on MQL5.

      "ObjectSet" function does not exist on MQL5? What should I change to make it work?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by miro1360

        ObjectSetInteger(0, LoadedObjectName(), OBJPROP_STATE, 0);

        ObjectSetInteger(0, "exactObjectName", OBJPROP_STATE, 0);

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 1
        • R
          rafaelgrecco last edited by

          Thanks miro!!

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          Online Users

          T
          S
          A
          M
          R
          G
          G
          Y
          C
          S
          S
          S

          22
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors