fxDreema

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

    EA coding Help needed

    General Discussions
    8
    10
    3571
    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.
    • C
      cee1cee4 @fxDreema last edited by

      @fxdreema
      I saw that trade close is placed before buy now and sell now block, is that supposed to be correct? How do you close a trade you have not entered yet? https://fxdreema.com/demo/mt4-buy-sell- ... conditions

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

        Hi everybody,
        i would like to write an EA that buys or sells when the indicator draws an arrow...
        i'm not very good in writing EAs so I tried but i don't know how to do that.
        can you please help me?
        thank you 😃

        P.S. the indicator i'm refering to is the following

        ......
        #Momentum onChartSignals Indicator v1.0.mq4

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

          Try "Condition" like this:

          Indicator > Value Numeric 0

          Use the proper buffer, but with Candle ID bigger than 0. Indicators who draw arrows most often return EMPTY_VALUE for the current candle (where Candle ID = 0).
          Note that in "Condition" if on of both sides equals to EMPTY_VALUE, the block does not pass. That's why it cannot pass if the buffer is EMPTY_VALUE.
          After "Condition" you can put "Once per bar".

          Another way is to use "Indicator is visible" instead of "Condition". Again, with Candle ID bigger than 0.

          Also, there is a block "Indicator appear", which acts a little bit differently than "Condition".

          1 Reply Last reply Reply Quote 0
          • R
            Rakiura last edited by

            fxDreema

            Could you please explain your comment how that "Indicator appear", acts a little bit differently than "Condition"?

            Thanks
            Justin

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

              The moment when its value turns from EMPTY_VALUE or 0 to something different than EMPTY_VALUE or 0. This is one time signal.

              Condition checks 2 values. Only when crossover is used, it checks 4 values - 2 from one candle and 2 from another (older candle). But it gives continuous signals. Condition can pass on every tick until the condition is true.

              1 Reply Last reply Reply Quote 0
              • S
                shafqat last edited by

                i want to build EA on MA Cross Over...can you tell me if my buy order is executed on above MA cross over and want to close it below MA cross over and same time sell order will be executed or not.....? if not why ?

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

                  You are probably asking for something like this - https://fxdreema.com/demo/mt4-buy-sell- ... conditions

                  C 1 Reply Last reply Reply Quote 0
                  • T
                    tripple last edited by

                    FXDremma: can u code me an EA to buy and sale basted on an indicator?

                    1 Reply Last reply Reply Quote 0
                    • K
                      keydcuk last edited by

                      Normally I would not have looked at this but I thought it would have been quick enough to put something together.

                      There is a problem with this indicator. Although it posts blue and red arrows, there is something wrong with the coding in buffers.

                      I have put something in strategy tester and it only picks up the first arrow. I have tried using opposite arrows to close signals and it doesn't work so I moved on to use a close condition of of a cross of price above or below the 13 MA depending if it was a buy or a sell trigger.

                      It triggers the first trade and the close works but after the 1st trade, it trades no more. My programming is right. There is nothing wrong with the fxdreema or the configuration I used. For some reason, the buffers don't work correctly on the indicator.

                      A lot of indicators struggle to be implemented into EAs and I believe this is another case of this.

                      Daniel

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

                        Threadopener: is it still relevant?

                        If your indicator is really worth to be used you ask me by private message for fixing the buffers or using some other "tricks" to read the arrows for use in an EA.

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

                        Online Users

                        E
                        A

                        16
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors