fxDreema

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

    Hi I need help in creating an interface like this everytime I try it the image gets cropped and blackouts my candlesticks it's not transparent

    General Discussions
    3
    3
    267
    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.
    • J
      Judas last edited by

      screenshot_20241030_233954_video-player.jpg

      1 Reply Last reply Reply Quote 0
      • jstap
        jstap last edited by

        Not enough information to show the problem you are having

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 0
        • Monaco
          Monaco Banned last edited by Monaco

          To create an interface overlay in MQL4 without blocking or darkening candlesticks, follow these steps:

          Step 1: Create a Transparent Bitmap Object
          Define a Bitmap Label Object: Use OBJ_BITMAP_LABEL to create an image overlay that won't interfere with the chart.

          ObjectCreate(0, "ImageLabel", OBJ_BITMAP_LABEL, 0, 0, 0);
          Set the Position and Size of the object:
          
          ObjectSetInteger(0, "ImageLabel", OBJPROP_XSIZE, 200); // Width in pixels
          ObjectSetInteger(0, "ImageLabel", OBJPROP_YSIZE, 200); // Height in pixels
          

          Step 2: Use a Transparent Image
          Ensure your image is a PNG with a transparent background. Load it into the object:

          ObjectSetString(0, "ImageLabel", OBJPROP_BITMAP, "my_image.png");
          

          Step 3: Adjust Layering and Transparency
          Set Color Transparency if using custom shapes or areas, apply clrNone for transparency.
          Use Z-ordering (OBJPROP_ZORDER) to control layering so your overlay stays behind or above the candlesticks as needed.

          
          int OnInit() {
              ObjectCreate(0, "ImageLabel", OBJ_BITMAP_LABEL, 0, 0, 0);
              ObjectSetInteger(0, "ImageLabel", OBJPROP_XSIZE, 200); // Width
              ObjectSetInteger(0, "ImageLabel", OBJPROP_YSIZE, 200); // Height
              ObjectSetInteger(0, "ImageLabel", OBJPROP_XDISTANCE, 50); // X position
              ObjectSetInteger(0, "ImageLabel", OBJPROP_YDISTANCE, 50); // Y position
              ObjectSetString(0, "ImageLabel", OBJPROP_BITMAP, "my_image.png"); // Transparent PNG
              return(INIT_SUCCEEDED);
          }
          

          Final Tips
          Use PNG with transparency to avoid darkening the chart.
          Adjust OBJPROP_ZORDER to control whether the overlay appears above or below chart elements.
          This setup will allow you to add an overlay without obscuring candlesticks.

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

          Online Users

          R
          F
          S

          15
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors