How to make this EA?

Leandro Baruch

Recruit
Messages
3
Hello guys!

I have a indicator and want to makes it to trade automatic.

Its a moving average, blue you buy, pink you sell.

My idea is, the EA should open a position after the candles of H1 closes.
Example, it closed and the MA is blue, so it open a buy order.

Hold it until we see a H1 candle close and the MA turn pink. Then close buy and open sell.

Since the indicador do not repaint after the candle closes, it will work fine.

Is that dificult to create?

Thanks
 

Attachments

  • pandaMA.jpg
    pandaMA.jpg
    67.4 KB · Views: 58
Hello guys!

I have a indicator and want to makes it to trade automatic.

Its a moving average, blue you buy, pink you sell.

My idea is, the EA should open a position after the candles of H1 closes.
Example, it closed and the MA is blue, so it open a buy order.

Hold it until we see a H1 candle close and the MA turn pink. Then close buy and open sell.

Since the indicador do not repaint after the candle closes, it will work fine.

Is that dificult to create?

Thanks

Hi Leandro!

You can create it in StrategyTune (this program is free, don't need to install). Watch this, how to create MA Cross EA:


As i guess in your example MA is blue, when current Close more than last Close price. And it's pink, when current Close less than last Close.
So just need to compare MA with shift = 1 and MA with shift = 2.

Look at MA.png attached, this is how Your strategy looks. Also You can add inputs for period and volume.
You can load file MA.txt (attached) in StrategyTune, then just click yellow button and program will generate MQL code.

Note: to use it You need to register (it's free).
 

Attachments

  • MA.png
    MA.png
    23.3 KB · Views: 43
  • MA.txt
    4 KB · Views: 22
Last edited by a moderator:
Interesting, but it requires setting up an account with Alpari NZ to get "free" access.
 
Back
Top