**C0mput3r:**

Hi Guys,

I have been trading on OANDA for years but am new to Autotrading platforms. I want to write an EA that will do the following but I have no idea where to start:

- After 5
__consecutive__positive ticks (5 green 1-second candles), It should enter a long trade with the maximum units available (based on my current balance). With a TP of 3% (of current balance) and SL of -10% (of current balance). - After 5
__consecutive__negative ticks (5 red 1-second candles), It should enter a short trade with the maximum units available (based on my current balance). With a TP of 3% (of current balance) and SL of -10% (of current balance).

- Yes I know 3% TP and -10% SL sounds crazy and is a massive negative risk-reward ratio, but I have run backtesting on millions of lines of historical 1 second data through VBA coding and the strategy is very profitable, as on a micro time-frame after a small trend is established the probability of reaching 3% TP is exponentially higher than hitting -10%, provided you use a leverage of no more than 50 and enter the
__maximum available units__on every trade. - As I have always used OANDA, I am used to trading custom amount of units and not standard lots, mini lots etc. I have been playing around with MT4 and seen that you can't customise the exact amount of units (for example 4351 units, if that's what is available with your current balance in your account.) This is a serious drawback to my strategy and the only way to counter this is have the EA calculate what the maximum amount of micro lots can be traded with the current account balance and calculate where to place TP and SL levels so that combined the trades make up either 3% or -10%. Unless ofcourse there is any possible way to write the EA to use the available lots?? If not, then once a buy/sell entry parameter is reached, the EA should trade as many of the smallest lots (I'm assuming micro lots) as possible at the same time.
- If the maximum available units (or as close to as possible) are not used, then to reach a target of 3%, the TP would have to be placed too far away from the entry point, cancelling out the effect of the short term trend.
- As the idea would be to use (almost) all available units per trade, it should not be possible to enter short trade while a long trade is still open.
- I want to trade EUR/USD primarily as it is the most liquid, but wish to later diversify across currencies, commodities and indices.
- I know that MT4 does not provide 1-second charts but have found some that people have created for MT4 online but cannot get them to work.
- The maximum available units are calculated as (Current Balance in your account / Current price ofEUR/USD) xLeverage- 1

Thanks in advance and happy trading!

Kind regards,

Anton.

Hi Guys,

I have been trading on OANDA for years but am new to Autotrading platforms. I want to write an EA that will do the following but I have no idea where to start:

consecutivepositive ticks (5 green 1-second candles), It should enter a long trade with the maximum units available (based on my current balance). With a TP of 3% (of current balance) and SL of -10% (of current balance).consecutivenegative ticks (5 red 1-second candles), It should enter a short trade with the maximum units available (based on my current balance). With a TP of 3% (of current balance) and SL of -10% (of current balance).maximum available unitson every trade.Thanks in advance and happy trading!

Kind regards,

Anton.