Termos de Referência


*Strategy:*

- Buy when the 50-day moving average crosses above the 200-day moving average
- Sell when the 50-day moving average crosses below the 200-day moving average

*Code:*
```
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
int OnInit()
{
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Script deinit function                                            |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectDelete(_MA50);
   ObjectDelete(_MA200);
}

//+------------------------------------------------------------------+
//| Script tick function                                              |
//+------------------------------------------------------------------+
void OnTick()
{
   double ma50 = iMA(Symbol(), PERIOD_CURRENT, 50, 0, MODE_SMA, PRICE_CLOSE, 0);
   double ma200 = iMA(Symbol(), PERIOD_CURRENT, 200, 0, MODE_SMA, PRICE_CLOSE, 0);
   
   if (ma50 > ma200 && OrderSend(_Symbol, OP_BUY, 0.1, Ask, 3, Bid-20*Point, Bid+20*Point, "MyOrder", 0, 0, Green) == ORDER_RETCODE_DONE)
   {
      Comment("Buy order executed");
   }
   
   else if (ma50 < ma200 && OrderSend(_Symbol, OP_SELL, 0.1, Bid, 3, Ask-20*Point, Ask+20*Point, "MyOrder", 0, 0, Red) == ORDER_RETCODE_DONE)
   {
      Comment("Sell order executed");
   }
}

//+------------------------------------------------------------------+
//| Script deinit function                                            |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectDelete(_MA50);
   ObjectDelete(_MA200);
}
```
This code creates a simple moving average crossover strategy, buying when the 50-day MA crosses above the 200-day MA and selling when it crosses below.

Respondido

1
Desenvolvedor 1
Classificação
(2)
Projetos
3
0%
Arbitragem
0
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(16)
Projetos
17
12%
Arbitragem
1
0% / 100%
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(32)
Projetos
53
36%
Arbitragem
4
25% / 50%
Expirado
6
11%
Ocupado
4
Desenvolvedor 4
Classificação
(54)
Projetos
159
69%
Arbitragem
4
100% / 0%
Expirado
1
1%
Livre
5
Desenvolvedor 5
Classificação
(2398)
Projetos
3011
65%
Arbitragem
76
47% / 14%
Expirado
340
11%
Trabalhando
6
Desenvolvedor 6
Classificação
(2)
Projetos
1
0%
Arbitragem
2
0% / 0%
Expirado
0
Trabalhando
7
Desenvolvedor 7
Classificação
(54)
Projetos
73
44%
Arbitragem
21
14% / 67%
Expirado
8
11%
Livre
8
Desenvolvedor 8
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
9
Desenvolvedor 9
Classificação
(1119)
Projetos
1421
62%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
10
Desenvolvedor 10
Classificação
(45)
Projetos
52
29%
Arbitragem
2
0% / 0%
Expirado
0
Trabalhando
11
Desenvolvedor 11
Classificação
(561)
Projetos
928
48%
Arbitragem
301
59% / 25%
Expirado
123
13%
Carregado
Pedidos semelhantes
Don't have much money to offer you but I am looking for a developer with expertise in both Pine Script and MQL4/MQL5 to convert TradingView strategy script into a fully functional MetaTrader Expert Advisor (EA). The tradingview pine script is based on SMC patterns indicator with user defined TP and SL It incorporates essential elements such as volume analysis and a data table. It scans CHOCH and BOS patterns
Seeking an expert in LSTM (Long Short-Term Memory) for MT4 to implement the most cutting-edge and advanced form of LSTM with full feature integration. The ideal candidate will possess extensive experience in leveraging LSTM technology within MT4, ensuring optimal performance and profitability. Join us in revolutionizing trading strategies with state-of-the-art LSTM algorithms tailored for MT4. Add a zig zag to the
Need an expert to create an EA based on my strategy for any broker,fast execution of opening and closing trade,also with a condition for take profit,lot size isn't fixed,it should be easy to change without editing the code for a no programmer
Hello there, I have a functional EA that I need a modification done to. Previous developer is overloaded with work and has been dragging his feet. Basically what I need is a modification to the Auto Lot option. Currently you can set a lot size per x amount of account balance and it will auto trade readjusting the lots based on account balance. What I am looking for is a modification that allows me to specify the
I need a robot/Ea that can open pending orders based on th market price for SELL/BUY fora given pair. It needs a few configurable parameters like: MARKET_PRICE --> As described, it is the entry point from where to create an initial marker for the orders. (The real market price for a PAIR) INITIAL_GAP - this is a number in pips that, in addition to the MARKET price, becomes the first real entry point for the first
Please note that my budget is for both mt4 and mt5 platforms The EA should have 1. An option that I can change it parameters, that's the period, method and application 2. The EA should sell when on every bullish candle that closes under the MA 3. The EA should buy on every bearish candle that forms Above the EA. It's should close trades on reverse cross. I mean when it's in a buy trade and crosses the MA for a sell
I have working MT4 and MT5 example program code using pipes via importing kernell32.dll in MT5 to receive transactional messages sent from another MT4 instance running. Most of the time it works fine. But intermittently I get an ‘Access violation’ error generated showing in the Experts tab of MT5. It fails to read the message sent from MT4 and does not trap the error. Also, when I try it on a different VPS computer -
Am nevoie de o conversie a unui EA din mql4 in mql5. La final sa fie testata, compilata si rezultatul sa nu aiba erori. Modificarea parametrilor sa se faca dint-un fisier cu extensia txt. Am eu modelul Hi. I need a conversion of an EA from mql4 to mql5. At the end, it should be tested, compiled and the result should have no errors. Modifying the parameters should be done from a file with the extension txt. I have the
I have an EA which trades with XAUUSD with a grid system, and I need to add a few features: 1.- The EA works with an indicator and open many trades as a grid system. I need the EA to open JUST 1 TRADE INMEDIATELY WHEN THE TREND SHOWS. 2.- I need the EA to keep that trade open until it reaches TP or the reverse signal shows. The EA has already the 'close if reverse signal' parameter. 3.- I need to create a parameter
Hello, I am looking for someone to convert my MQL4 code project to MQL5. A brief description of my current strategy: MT4 'Spreadsheet' EA collects data from 28 FX currency pairs -> sends it to Excel, then Excel calculates and makes a decision -> Excel sends a signal to MT4 'Trading' EA and manages trades I want the MT4 EA to be converted into MT5. For Back testing purposes, I want to withdraw from using Excel and let

Informações sobre o projeto

Orçamento
50+ USD
Desenvolvedor
45 USD
Prazo
de 1 para 4 dias