Download MetaTrader 5

I would like to create a straddle EA

To add comments, please log in or register
Are you a good trader? Become a signals provider and make even more money!
enzov12
8
enzov12 2014.08.05 19:59 

Hi everyone.

I would like to create a straddle EA:

Parameters: Currency (EUR/USD, GBP/USD, USD/CHF, USD/JPY, AUD/USD, NZD/USD, USD∕CAD), date (yyyy/mm/dd, hh:mm), leverage.

First i would like to entry 2 pending orders exactly 1 minute before the news release.

I would like to cancel all the pending orders 30 seconds after the news release.

The 2 pending orders would be like that: buy stop at  the distance of the spread + 3 ATR (1 minute) from the "ask"; sell stop  at  the distance of the spread - 3 ATR (1 minute) from the "bid"

One order cancel the other.

A traling stop of the distance of the spread + 3 ATR (1 minute).

The profit target: when the SAR parabolic 1 minute becomes selling for a long trade, when the SAR parabolic 1 minute becomes buying for a short trade.


Thank's for your help!!!

Alain Verleyen
Moderator
30721
Alain Verleyen 2014.08.05 22:00  
Rasoul Mojtahedzadeh
27545
Rasoul Mojtahedzadeh 2014.08.15 00:37  
enzov12:

Hi everyone.

I would like to create a straddle EA:

Parameters: Currency (EUR/USD, GBP/USD, USD/CHF, USD/JPY, AUD/USD, NZD/USD, USD∕CAD), date (yyyy/mm/dd, hh:mm), leverage.

First i would like to entry 2 pending orders exactly 1 minute before the news release.

I would like to cancel all the pending orders 30 seconds after the news release.

The 2 pending orders would be like that: buy stop at  the distance of the spread + 3 ATR (1 minute) from the "ask"; sell stop  at  the distance of the spread - 3 ATR (1 minute) from the "bid"

One order cancel the other.

A traling stop of the distance of the spread + 3 ATR (1 minute).

The profit target: when the SAR parabolic 1 minute becomes selling for a long trade, when the SAR parabolic 1 minute becomes buying for a short trade.


Thank's for your help!!!

You can first try these two free News EAs available in Codebase:

https://www.mql5.com/en/code/10511

and this one which is pretty close to what you want to do:

https://www.mql5.com/en/code/8491

To add comments, please log in or register