fxDreema

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

    Connecting Binary Options to EA signals

    Questions & Answers
    4
    17
    5166
    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.
    • vish
      vish last edited by fxDreema

      I have an EA that simply draws up and down arrows for buy/sell signals (https://fxdreema.com/shared/DQzPOuVjd). I am trying to use a tool provided by mt2iq.com to automatically capture the signals from the EA and make buys or sells on IQoption.com.

      mt2iq.com provides an MQL Connector Library that can get the signals from the EA (as given here: https://www.mt2iq.com/mt2iq-library).

      It provides following Example for placing Up/Down trades on Up_Arrow_Condition and Down_Arrow_Condition of an EA:

      int OnCalculate(const int rates_total,
                      const int prev_calculated,
                      const datetime &time[],
                      const double &open[],
                      const double &high[],
                      const double &low[],
                      const double &close[],
                      const long &tick_volume[],
                      const long &volume[],
                      const int &spread[])
        {
           //...
          ArraySetAsSeries(time,true); // ---> only in MQL5
         bool Up_Arrow_Condition = ...
         bool Down_Arrow_Condition = ...
         if (UP_Arrow_Condition && signaltime != time[0])
         {
            mt2iq(Symbol(), "CALL", 10, 5);
            signaltime = time[0];
         }
         if (DOWN_Arrow_Condition && signaltime != time[0])
         {
            mt2iq(Symbol(), "PUT", 10, 5);     
            signaltime = time[0];   
         } 
         //...
         return(rates_total);
        }
      

      I guess I need to update the following conditions based on my EA code. Can anyone help me do this?
      bool Up_Arrow_Condition = ...
      bool Down_Arrow_Condition = ...

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

        @vish said in Connecting Binary Options to EA signals:

        OnCalculate

        OnCalculate() is only to be used in indicators, this event function doesn't work in EAs

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

          Ok, it looks that they have some external library with a function called mt2iq that does something. I created a custom block for you, you can find it here: 0_1535977418579_a7ee4e2d-c104-42a2-b5e9-1e986d3c0dce-image.png
          I didn't tested it, but I hope that it works. It has 4 input parameters for the symbol, type, amount and expiry.

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

            Thank you very much. I will check this out and let you know if it works

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

              I just created a small EA with this block here: https://fxdreema.com/shared/36Ilwuuee I am not sure if I got it right. However, I can not compile, it gives an error as follows:

              Compilation errors
              '!' - illegal operation use

              Can you help?

              R fxDreema 2 Replies Last reply Reply Quote 0
              • R
                robgall @vish last edited by

                @vish said in Connecting Binary Options to EA signals:

                I just created a small EA with this block here: https://fxdreema.com/shared/36Ilwuuee I am not sure if I got it right. However, I can not compile, it gives an error as follows:

                Compilation errors
                '!' - illegal operation use

                Can you help?

                My problem is similar but in MT2binary.

                Thanks

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

                  @vish Ha, I didn't expected that something simple like if (!symbol) {} doesn't work. I changed it to if (symbol == "") {}. You can see the code yourself

                  @robgall, I created similar custom block for you too.

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

                    30/5000
                    Magnificent. Where do I find it?

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

                      Great. It works fine. Thanks

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

                        @fxdreema said in Connecting Binary Options to EA signals:

                        custom block for you too

                        Remember my custom block. Please....

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

                          @robgall You have it
                          0_1537040679438_83977ce1-4cd3-4d1f-9275-d86f0552ed08-image.png

                          I didn't tested it, but it's almost not any different than vish's custom block

                          vish 1 Reply Last reply Reply Quote 0
                          • R
                            robgall last edited by

                            I put it in these two ways but no operation appears

                            0_1537219411547_Dibujo1.JPG

                            0_1537219439675_Dibujo2.JPG

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

                              Can you test those functions provided by the broker? You can also check the custom block I made for you (https://fxdreema.com/studio/MQL4), it's not so much of a code. I may be missing something, but it looks correct for me. I can't check it because I don't have an account in this bloker 🙂

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

                                ALL OK .UNTIL THE MILLION DOLLARS DO NOT STOP

                                1 Reply Last reply Reply Quote 0
                                • H
                                  harrico last edited by

                                  i want to learn how to build strategies for binary option. can anybody help?

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

                                    @fxdreema
                                    Can you please make this MT2Binary block also in my section? I tried to make a block based on MT2IQ but it does not work.

                                    This has some details on this plugin: https://www.mt2binary.com/mt2binary-library

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

                                      I think you have mt2binary block already

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

                                      Online Users

                                      R
                                      S
                                      D
                                      V
                                      O

                                      12
                                      Online

                                      146.7k
                                      Users

                                      22.4k
                                      Topics

                                      122.6k
                                      Posts

                                      Powered by NodeBB Forums | Contributors