Spécifications
*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.
Répondu
1
Évaluation
Projets
4
0%
Arbitrage
1
0%
/
0%
En retard
0
Gratuit
2
Évaluation
Projets
38
21%
Arbitrage
5
0%
/
60%
En retard
0
Gratuit
3
Évaluation
Projets
65
34%
Arbitrage
4
25%
/
50%
En retard
9
14%
Travail
4
Évaluation
Projets
243
74%
Arbitrage
7
100%
/
0%
En retard
1
0%
Gratuit
Publié : 1 article
5
Évaluation
Projets
3382
68%
Arbitrage
77
48%
/
14%
En retard
342
10%
Gratuit
Publié : 1 code
6
Évaluation
Projets
8
13%
Arbitrage
6
33%
/
33%
En retard
0
Gratuit
7
Évaluation
Projets
82
44%
Arbitrage
27
11%
/
70%
En retard
8
10%
Gratuit
8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Évaluation
Projets
1462
63%
Arbitrage
21
57%
/
10%
En retard
43
3%
Gratuit
10
Évaluation
Projets
435
54%
Arbitrage
20
55%
/
15%
En retard
30
7%
Travail
11
Évaluation
Projets
945
47%
Arbitrage
309
58%
/
27%
En retard
125
13%
Gratuit
Commandes similaires
I have a 90% completed project with the execution part left to complete, I have been struggling to complete this section and I need help from someone expert in MQL5 with knowledge on forex trading and ICT Concepts coding. Contact me for further details
Hi, I am looking for someone to create me a trading indicator that will scalp the market 30-90 pips successfully in high volumes, I would like to be able to bridge this to create a signal channel for my community so it would need to have buy and sell indication on the indicator we run quite small stop losses so execution of trades can’t go in to draw down much alternatively create me a MT5 EA bot that scalps the
High frequency scalping bot wanted
1000+ USD
Hi basically I'm wanting an already made EA scalper that's constantly in and out of trades on the M1 time frame that has good risk management. It knows what it's doing. Most of its trades are profitable and that can start with £100. I am willing to pay up to £1000 for the right scalping bot. If you please have one and you're very confident in it, please allow me to use a live version to see how it does and if I'm
hello good evening All professional programmers! I'd like to request a special services I need a Gold and Silver trading bot like the one in the video, one that works on real accounts. My only request is that I don't pay any money until the bot is built and tested. Thank you very much please contact me as soon as possible for more information
Automated trading system
30+ USD
Auto trading system on mobile with high probability win rate. Trades and auto trading system that works well on gold and forex, most important risk reward ratio. It must be 1:3 or more then that whenever possible
Automated trading system
30+ USD
Auto trading system with hi probability win rate. Trades and auto trading system works well on gold and forex most important risk reward ratio. It must be 1:3 or more then that
Hello, i would like to have a ninjatrader indicator. I wanna to have a footprint indicator with delta, imbalances and big trades identifiable. Also I wanna sell it on whop. And it should be fully customisable in NT8
Intraday Trade Ninja EA
33+ USD
Intraday Trade Ninja EA Indicators used: Price Border(TMA) MA-X Arrows xSuperTrend Candles EMA 49 & 89- Per Candle Color Switching Lemansignal 200 SMA Major Criteria to consider before a trade setup or condition is taken · The price must have touched/tested the upper or
Panda101
500+ USD
//+------------------------------------------------------------------+ //| Simple Moving Average Crossover EA | //+------------------------------------------------------------------+ #property strict input int ShortMA = 10; input int LongMA = 50; input double LotSize = 0.01; int shortMAHandle; int longMAHandle; //+------------------------------------------------------------------+ int OnInit() { shortMAHandle =
I need an experienced MQL5 developer to build a custom MT5 Expert Advisor for XAUUSD. Strategy Overview: Trend-following using EMA 50/200 on H4 and H1 Pullback entries on M5 using RSI + candle confirmation No martingale, no averaging down Controlled scaling only when trades are already in profit Maximum 2–3 positions per direction Risk Management: Daily loss limit (%) Equity hard stop (%) Consecutive loss pause
Informations sur le projet
Budget
50+ USD
Délais
de 1 à 4 jour(s)