Download MetaTrader 5
To add comments, please log in or register
The Market has more than 400 indicators. Try any of them!
Peter Crosby
10
Peter Crosby 2014.03.18 21:31 
Is there somewhere I can go to find EA's to download?

I've tried reading this site on how to write the code but its just gobbledygook to me!

I'm trying to find an EA that switches between long and short depending on which side of an MA the price is on. Can anyone help?
Simon Gniadkowski
Moderator
17962
Simon Gniadkowski 2014.03.18 21:49  
PSC278:
Is there somewhere I can go to find EA's to download?

I've tried reading this site on how to write the code but its just gobbledygook to me!

I'm trying to find an EA that switches between long and short depending on which side of an MA the price is on. Can anyone help?
Did you look at the EAs in the CodeBase ?
Tjipke de Vries
6275
Tjipke de Vries 2014.03.18 22:20  
PSC278:
Is there somewhere I can go to find EA's to download?

I've tried reading this site on how to write the code but its just gobbledygook to me!

I'm trying to find an EA that switches between long and short depending on which side of an MA the price is on. Can anyone help?


You already have one opening a MT4 account

It's this one..... at opening new bar it looks where the price is on

//+------------------------------------------------------------------+
//|                                               Moving Average.mq4 |
//|                   Copyright 2005-2014, MetaQuotes Software Corp. |
//|                                              https://www.mql4.com |
//+------------------------------------------------------------------+
Peter Crosby
10
Peter Crosby 2014.03.20 01:08  

Ive tried running that deVries

But there are gaps between trades it looks like there are some other parameters that the code consiedrs which I cant work out by looking at it.

How do you get the chart to display the MA?

What I want to start with then develop is an EA which is always in the market so it first remains dormant until the price crosses or bounces off the specified MA and then it takes an appropriate position: e.g Long if the price is above the MA. The position should then stay open until the price crosses the MA again at which point it should reverse and go short.

If a profit is booked then fine.

If a loss is booked then the lot size should increase to make up for what is lost to the spread, this should continue until a profit is booked.

I think to make this work it has to look at every tick not just the first one on a bar.

/
To add comments, please log in or register