Specification

// Define the properties
input int ShortPeriod = 12;
input int LongPeriod = 26;
input double LotSize = 0.1;

// OnTick function is called every time there is a price update
void OnTick()
{
    double shortMA = iMA(NULL, 0, ShortPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
    double longMA = iMA(NULL, 0, LongPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);

    double prevShortMA = iMA(NULL, 0, ShortPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
    double prevLongMA = iMA(NULL, 0, LongPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);

    if (prevShortMA < prevLongMA && shortMA > longMA)
    {
        // Buy signal
        OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, 0, 0, "Buy Order", 0, 0, clrGreen);
    }
    else if (prevShortMA > prevLongMA && shortMA < longMA)
    {
        // Sell signal
        OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, 0, 0, "Sell Order", 0, 0, clrRed);
    }
}

Responded

1
Developer 1
Rating
(93)
Projects
119
50%
Arbitration
4
50% / 50%
Overdue
3
3%
Free
2
Developer 2
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(45)
Projects
46
24%
Arbitration
34
9% / 85%
Overdue
10
22%
Free
4
Developer 4
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
5
Developer 5
Rating
(152)
Projects
228
80%
Arbitration
22
27% / 50%
Overdue
11
5%
Free
Published: 24 articles, 1882 codes
6
Developer 6
Rating
(9)
Projects
19
16%
Arbitration
3
67% / 0%
Overdue
0
Free
7
Developer 7
Rating
(252)
Projects
258
30%
Arbitration
0
Overdue
3
1%
Free
Published: 2 codes
8
Developer 8
Rating
(511)
Projects
549
53%
Arbitration
13
69% / 15%
Overdue
3
1%
Free
9
Developer 9
Rating
(7)
Projects
9
0%
Arbitration
1
0% / 100%
Overdue
2
22%
Free
10
Developer 10
Rating
(4)
Projects
5
20%
Arbitration
2
0% / 100%
Overdue
1
20%
Free
Published: 3 codes
11
Developer 11
Rating
(2)
Projects
5
0%
Arbitration
3
0% / 100%
Overdue
1
20%
Working
12
Developer 12
Rating
(270)
Projects
552
49%
Arbitration
57
40% / 37%
Overdue
227
41%
Working
13
Developer 13
Rating
(4)
Projects
5
20%
Arbitration
0
Overdue
2
40%
Free
Published: 2 articles, 1 code
14
Developer 14
Rating
(1)
Projects
1
100%
Arbitration
0
Overdue
0
Free
15
Developer 15
Rating
Projects
1
0%
Arbitration
1
100% / 0%
Overdue
0
Free
Similar orders
Hello, I have a breakout EA with reversal logic. I own the full source code for both MT4 and MT5 versions. I need the modifications implemented for both MT4 and MT5 versions. I need several modifications: – Multiple reversals with configurable parameters – Breakeven functionality – Entry only after candle close beyond range + offset – Time-based activation – Alternative offset calculation logic – Automatic close at
PROJECT DESCRIPTION Looking for 1 experienced MQL5 developer to build 2 Expert Advisors for MetaTrader 5, targeting XAUUSD and major currency pairs. Strong preference for a single developer handling both EAs to maximize code reuse, reduce cost, and ensure consistency. EA1 — Grid Martingale Pro · Buy/Sell grid with Fixed or ATR Dynamic distance (ATR read once per fill, stored in grid_step_at_open[]) · Gap
Hi I have a simple task (hopefully) I have a custom strategy that I built with the help of Claude Anthropic - everything is finished and I zipped it with power shell but when importing it NT8 gives me the error message that the file was made from an older, incompatible version or not a NinjaScript. My folder structure is correct as far I can see so I don't know what the issues is and it's costing me too much to go
Do you happen to have a profitable strategy for MNQ? it is urgent if any one can help me with this i will be happy to discuss with you and move forward to pay for it kindly let me know the amount thank fill free to bid
Subject: Development of Ultra-High Precision Confluence Indicator - M1 Binary Options (Non-Repaint) ​ Hello, I am looking for a Senior MQL5 Developer to create a custom "Surgical Precision" indicator for MetaTrader 5, specifically optimized for 1-minute (M1) Binary Options trading. The system must integrate three distinct layers of algorithmic analysis. ​ 1. Core Logic: Triple-Layer Confluence ​The signal (Call/Put)
Looking for an experienced MQL5 developer to design and develop a custom Expert Advisor (EA) for MetaTrader 5. The purpose of this EA is not just automated trading, but also to help me better structure, test, and refine my personal trading strategy
Olá amigos possuo um indicador que não tem o código fonte mas tenho a licença para usar esse indicador que está me trazendo bons resultados no meu operacional desejo automatizar as suas entradas através de um robô funciona mais ou menos da seguinte forma o indicador gera um sinal de compra ou venda e também gera um nível de take profit stop loss.O robô deve fazer a leitura dos sinais e definir TP e SL nos mesmos
Freeallfree 400 - 800 USD
Professional MT5 EA – XAUUSD I need a professional Expert Advisor for MT5 (MQL5) to trade XAUUSD only. This is not a random scalping bot. The EA must trade only high-probability liquidity breakouts during active sessions and avoid ranging or low-volatility markets. Symbol: XAUUSD Timeframe: M15 (optional H1 confirmation) Session filter (Dubai GMT+4): Trade only London and New York sessions Adjustable session times No
My EA has serious problems and needs full improvement and optimization. Problems: No Stop Loss and Take Profit No risk management system High drawdown and losses Opens multiple trades at same entry (overtrading) No maximum trades per day limit No maximum open trades per symbol No trailing stop Poor entry logic and weak signals Trades open very late (after many days) No equity protection system No daily loss limit No
Hi, I need a simple MT5 EA. Based on my simple trading strategy I'm going to discuss with you If you have experience in this kindly bid for this project Thanks

Project information

Budget
30 - 250 USD
Deadline
from 1 to 7 day(s)