fxDreema

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

    osma trendlines

    Questions & Answers
    2
    4
    1080
    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.
    • B
      b0ll1ng3r last edited by

      I'm trying to get a robot to buy / sell based on a new trendline appearing on the chart which is drawn by a custom indicator. This is so I can trade osma divergence.

      I'm having a lot of trouble getting the robot to see the trendlines. It either seems not to see them or always see them.
      I've been through the forum relating to trendlines but cannot find the answer.

      I've tried various things with the functions:

      For each object
      Select object by name
      Check trendline price level

      But I've not come up with a solution.

      Basically the indicator draws trendlines called things like "OsMA_Divergence_v1_TroghPW_1433960280" or "OsMA_Divergence_v1_TroghPW_1433960160"

      The troughs have the prefix "OsMA_Divergence_v1_TroghPW_ then number"
      And the peaks have the prefix "OsMA_Divergence_v1_PeakPW_ then number"

      The trendlines are also colour coded as per their function (hidden / classic / bullish / bearish divergence) so there are four colours too which I thought I could target.

      As soon as one of these new trend lines appears I'd like to enter a buy / sell trade as they will tend to pick out a low / high point.

      I've attached the indicator. If someone could help me find the answer please. Thanks.

      ......
      OsMA_Divergence_v1.mq4

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

        Isn't it possible to use the buffers from this indicator? I can see that there are 3 buffers where 1 and 2 are for those gray dots. I didn't checked them, but I guess that they work.

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

          I do sort of see what you mean (I hadn't looked into buffers prior to you mentioning it. I'm still not sure I understand them).
          I'll have a try using buffers and see how I get on. Thanks.

          I've put something together using the block for MACD divergence. That's basically exactly how I want it to work but using this custom osma indicator instead of MACD. That's what I'm aiming for. Will let you know how I get on. Thanks.

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

            Here I tried to explain buffers: https://fxdreema.com/documentation/you% ... indicators
            Also, here is how to add indicators in fxDreema: https://fxdreema.com/documentation/work ... indicators

            Buffers are the way for the EA to communicate with the indicator. The indicator puts data in those buffers and the EA can then read that data.

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

            Online Users

            N
            J
            A
            Z

            15
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors