Specification


*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.

Responded

1
Developer 1
Rating
(2)
Projects
3
0%
Arbitration
0
Overdue
0
Free
2
Developer 2
Rating
(16)
Projects
17
12%
Arbitration
1
0% / 100%
Overdue
0
Free
3
Developer 3
Rating
(32)
Projects
53
36%
Arbitration
4
25% / 50%
Overdue
6
11%
Busy
4
Developer 4
Rating
(54)
Projects
159
69%
Arbitration
4
100% / 0%
Overdue
1
1%
Free
5
Developer 5
Rating
(2396)
Projects
3010
65%
Arbitration
76
47% / 14%
Overdue
340
11%
Working
6
Developer 6
Rating
(2)
Projects
1
0%
Arbitration
2
0% / 0%
Overdue
0
Working
7
Developer 7
Rating
(54)
Projects
73
44%
Arbitration
21
14% / 67%
Overdue
8
11%
Free
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(1118)
Projects
1420
62%
Arbitration
21
57% / 10%
Overdue
43
3%
Working
10
Developer 10
Rating
(43)
Projects
50
28%
Arbitration
2
0% / 0%
Overdue
0
Free
11
Developer 11
Rating
(559)
Projects
927
48%
Arbitration
301
59% / 25%
Overdue
124
13%
Loaded
Similar orders
I'm seeking a skilled developer to automate my trading strategy. The ideal candidate will have experience in algorithmic trading, proficient in coding languages such as Python or C++, and familiar with trading platforms like MetaTrader5 . The project involves creating a bot that can execute trades based on predefined criteria, manage risk, and adapt to market conditions. Knowledge of financial markets and backtesting
I am Ph.D. in Finance and I just bought 4 EA: EA Reaper --> 30USD EA Golden Emperador --> 30USD EA Golden Elephant and --> 30USD EA Quantum Lab --> 30USD I need a person that can help me to improve and test my strategy in this EA. I have some Ideas, but I do know how I can improve. I like also that you explain me how I can configurate well this EA in the future. I do not need program nothing. All I need is JOIN a
Hey greetings.i will like to convert my tradingview pinescript script to Metatrader 5 expert Advisor EA . Kindly apply for this job if you can convert my tradingview script for mt5 EA.Thanks
Hi I want you to make software, let's give the software a name " rocky", I want to explain the project to understand the possibility, example: let's assume I have a computer and there is some internet browsers open, now the software "rocky" you will make is monitoring the computers full screen or a region of screen continuesly and as soon as the internet browser updates with some graphical changes (which is the text
I need an EA in based of this indicator. It have buffers. The owner told me it..., So I need an expert who can do this I will attached the file right now
HI, I'm looking for an experienced person who can add buy/sell indications and Alerts on existing Pinescript along with little modification of the script and the script should connect to MT5 platform using pineconnector MT5 platform should excute trade instantly as based on the alerts/indications on tradingview script
I am looking for an EA that allows you to make profits every month. For this, before buying, I would like to have a history over more than one year to see how the EA behaves. I don't know if you're selling EAs that are already ready for use
I am looking for an EA that allows you to make profits every month. For this, before buying, I would like to have a history over more than one year to see how the EA behaves. I don't know if you're selling EAs that are already ready for use
I would like to ask the following: I work on a CTrader account (provided by a Broker) but on the Tradingview Platform. I would like to place an order with you if you make the following configuration correctly and at a good price: It is only about SL and TP. They must work like this: 1. When launching any order, SL should be set at 60p pips and TP at 4000 pips distance. 2. Whenever the launched position moves up or
HI, I'm looking for an experienced person who can add buy/sell indications/Alerts on existing Pinescript code along with little modification of the script and the script should connect to MT5 platform using pineconnector MT5 platform should execute trade instantly as based on the alerts/indications on tradingview script

Project information

Budget
50+ USD
Deadline
from 1 to 4 day(s)

Customer

Placed orders1
Arbitrage count0