fxDreema

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

    lastmanstanding swing point indicator (how to get candle IDs of swing dots?)

    Questions & Answers
    2
    4
    325
    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.
    • N
      nk0815 last edited by nk0815

      I want to use the following indicator to draw lines at swing highs and lows.

      I tried to get the candle IDs of the dots painted by the indicator via "find object by color" (it doesn't put them into buffers), but it still does not find them. Does anybody know how I can get the values?

      0_1653372733524_lastmanstandingindicatorv11.mq4

      From the indicator code, the drawing seems to be configured here. But I still don't know how to find it in a loop:

      //+------------------------------------------------------------------+
      //| Custom indicator initialization function |
      //+------------------------------------------------------------------+
      int OnInit()
      {
      //--- indicator buffers mapping
      SetIndexBuffer(0,majorSwingHigh); //associates array with buffer
      SetIndexStyle(0,DRAW_ARROW,EMPTY,MajorSwingSize,MajorSwingColor);
      SetIndexArrow(0,108); // drawing wingding 108
      SetIndexLabel(0,"Major Swing High");

      1 Reply Last reply Reply Quote 0
      • B
        biztet last edited by

        You should run strategy tester on your custom indicator every time you want to use it with your EA.
        By doing that you can decide whether the indicator can be used or not in your strategy.

        1 Reply Last reply Reply Quote 0
        • N
          nk0815 last edited by

          Found a way, it works via Indicator is visible 🙂

          1 Reply Last reply Reply Quote 0
          • B
            biztet last edited by

            Yes it works, but the signal is delayed, and the trade doesn't open at the candle after the blue circle, right?

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

            Online Users

            N
            S
            T
            A

            15
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors