EA for Binary Options : How to pass the expiration time in the ordersend() ?

 

Hello,

I try to develop en EA for Binary Options (On MetaTrader 4 with Tradetools FX plug-in for Binary Options).

I have already developped all my indicators and all the structure of the EA.

 

On the Forex, i know how to use the ordersend(), but with binary options, i don't found any information about how to pass the expiry of the binary option.

Of course, i don't speak about the expiration time  of a pending classic orders. But that relates to the expiry of the binary option (60 seconds, 5 minutes, 30 minutes, 1 hour for examples).

I already seen that this BO Expiry doesn't take place in the "expiration time" of the ordersend(). So i don't know where i can give this parameter to the broker when i send an order for a Binary Option.

 

Please, could somebody give me the way of properly placing a binary option order with MQL4 ?


Thanks by advance.

 Regards,

Nyk. 

 

Hello NykIcedryver,

I am looking for the same, please, contact me if you get the solution.

On the other hand, I have create some indicators to trade Binary Options 60 seconds in FX Lite module. Maybe we can share some info.

jglrmm@yahoo.es

BR, jgl. 

 

you can't add expiration times in OrderSend() but you can in OrderModify() ,  following this link :

https://docs.mql4.com/trading/ordermodify

 
samimaps:

I have found the solution to open automatically BO in FX Lite. Contact me if you want.

 

jglrmm@yahoo.es 

 

BR. 

 
jglrmm:

I have found the solution to open automatically BO in FX Lite. Contact me if you want.

 

jglrmm@yahoo.es 

 

BR. 

Hi Guys


i was looking into the same thing making a EA for binary, i have some very good ideas, now about mql5 but honeltly i lack the programming skills..:)


could we get in touch and exchange some info pls?


eiviss@icloud.com


Thx

Yves

 

Hey Guys,

 

I usually use the following (for a buy option, for exemple):

 

OrderSend(Symbol(), OP_BUY, Investiment, Close[0], 0, 0, 0, "BO exp:60", magic, 0, clrGreen);

 

where 60 is the 60 seconds position. If you want to open a position of 5min, for exemple, you must use 300 instead of 60. And of course, you must give expirations which match with the ones in your MT4 BO broker.

 
Marcos Maia:

Hey Guys,

 

I usually use the following (for a buy option, for exemple):

 

 

where 60 is the 60 seconds position. If you want to open a position of 5min, for exemple, you must use 300 instead of 60. And of course, you must give expirations which match with the ones in your MT4 BO broker.

thank you Marcos, it worked for me!
 

Hi All

I am also trying to get this working with no luck.  I have tried the command advised by Marcos but it rejects it.  I can use a command like this with a OP_BUY OR OP_SELL - however, I need to use an OP_SELLSTOP or OP_BUYSTOP command to issue a BO order with a strike price. 

Here is the command I am using:

OrderSend,AUDUSDbo,OP_SELLSTOP,0.01,.71,5,0,0,"BO exp:60",12345678,0,Orange

I can issue manual trades on this demo platform successfully but need to import trades from a CSV file, using this command.    If anyone can shed some light on why this is not work, I would be eternally grateful if you could PM me or answer via this message.


Thanks.

 

Hi All,

 I tried to open a binary options order by using the following statements, but it returns me error 3

ret = OrderSend(Symbol(),OP_SELL,20.0,Bid,0,0,0,"BO exp:300",0,0,clrGreen);

  Anyone knows how to get rid of this error?

 
broncoman:

Hi All

I am also trying to get this working with no luck.  I have tried the command advised by Marcos but it rejects it.  I can use a command like this with a OP_BUY OR OP_SELL - however, I need to use an OP_SELLSTOP or OP_BUYSTOP command to issue a BO order with a strike price. 

Here is the command I am using:

OrderSend,AUDUSDbo,OP_SELLSTOP,0.01,.71,5,0,0,"BO exp:60",12345678,0,Orange

I can issue manual trades on this demo platform successfully but need to import trades from a CSV file, using this command.    If anyone can shed some light on why this is not work, I would be eternally grateful if you could PM me or answer via this message.


Thanks.

Maybe there is no 1min expiration on that pair?
 

Hi Vasyl, 

 Thank you for you reply. But the expiration is not the problem. Because the EA from my broker works well at the same expiration. 

Reason: