Tarea técnica

#include <Trade/Trade.mqh>
CTrade trade;

input double LotSize = 0.1;
input int FastMA = 10;
input int SlowMA = 20;

int fastHandle, slowHandle;

// Initialize indicators
int OnInit()
{
   fastHandle = iMA(_Symbol, PERIOD_CURRENT, FastMA, 0, MODE_SMA, PRICE_CLOSE);
   slowHandle = iMA(_Symbol, PERIOD_CURRENT, SlowMA, 0, MODE_SMA, PRICE_CLOSE);
   return(INIT_SUCCEEDED);
}

void OnTick()
{
   double fastMA[2];
   double slowMA[2];

   CopyBuffer(fastHandle, 0, 0, 2, fastMA);
   CopyBuffer(slowHandle, 0, 0, 2, slowMA);

   // Previous and current values
   double fastPrev = fastMA[1];
   double fastCurr = fastMA[0];
   double slowPrev = slowMA[1];
   double slowCurr = slowMA[0];

   // Check if no open position
   if(PositionSelect(_Symbol) == false)
   {
      // BUY signal
      if(fastPrev < slowPrev && fastCurr > slowCurr)
      {
         trade.Buy(LotSize, _Symbol);
      }

      // SELL signal
      if(fastPrev > slowPrev && fastCurr < slowCurr)
      {
         trade.Sell(LotSize, _Symbol);
      }
   }
}

Han respondido

1
Desarrollador 1
Evaluación
(210)
Proyectos
282
46%
Arbitraje
27
59% / 37%
Caducado
36
13%
Libre
2
Desarrollador 2
Evaluación
(22)
Proyectos
21
10%
Arbitraje
4
25% / 75%
Caducado
0
Libre
3
Desarrollador 3
Evaluación
(15)
Proyectos
19
16%
Arbitraje
5
40% / 40%
Caducado
0
Libre
4
Desarrollador 4
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Trabaja
5
Desarrollador 5
Evaluación
(18)
Proyectos
23
9%
Arbitraje
6
33% / 50%
Caducado
1
4%
Trabajando
6
Desarrollador 6
Evaluación
(6)
Proyectos
5
0%
Arbitraje
3
33% / 33%
Caducado
2
40%
Trabaja
7
Desarrollador 7
Evaluación
(378)
Proyectos
487
24%
Arbitraje
59
54% / 25%
Caducado
56
11%
Trabajando
8
Desarrollador 8
Evaluación
(25)
Proyectos
33
24%
Arbitraje
3
33% / 33%
Caducado
4
12%
Trabaja
9
Desarrollador 9
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
10
Desarrollador 10
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
11
Desarrollador 11
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
12
Desarrollador 12
Evaluación
(73)
Proyectos
257
53%
Arbitraje
16
50% / 38%
Caducado
83
32%
Libre
13
Desarrollador 13
Evaluación
(10)
Proyectos
19
42%
Arbitraje
7
0% / 57%
Caducado
3
16%
Trabaja
14
Desarrollador 14
Evaluación
(28)
Proyectos
39
23%
Arbitraje
14
0% / 93%
Caducado
4
10%
Libre
15
Desarrollador 15
Evaluación
(50)
Proyectos
64
20%
Arbitraje
11
27% / 55%
Caducado
5
8%
Libre
16
Desarrollador 16
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
AI Trading Bot 30 - 80 USD
Essential Components for Indicator Specification Objective & Overview: Briefly describe what the indicator calculates (e.g., trend, momentum, volatility) and its main purpose. Input Parameters (Variables): List all user-definable inputs (e.g., Moving Average periods, ATR multiplier) to avoid hardcoding values. Detailed Logic/Calculation Rules: Explain the formula or logic to calculate indicator values. Define
looking for Expert to create or ready made solution for bonus hedge auto set cross trading of opposite trading strategy. the expert may guide what max and best he can do to make the EA perfect
I am seeking an expert MQL5 developer for a paid architectural consultation. I am currently in the process of building a trading platform and need a deep dive with a specialist who understands the "under the hood" mechanics of high-frequency execution and systematic bot design. Topics for Discussion: Engine Logic: Best practices for building a robust, low-latency execution engine on MT5. Risk Frameworks: Implementing
I need a mt5 Expert advisor ea to manage intraday trades with strict risk management. The EA must -Handle between 5 to 8 clean trades a day max altogether throughout all 3 sessions. no big news trading times and no overnight trades -Use 1% on forex pairs and upto 2% on XAUUSD risk per trade - Automatically calculate lot size based on stop loss -use fixed RR ratio [1:2] For forex pairs, the stop loss should be
Ninjatrdaer Script 500 - 1000 USD
I am looking to purchase a ninjatrader script, if there is any for sale, i mean a ready made ninjatrdaer script that trade futures, i need the seller to show me a backtest of the system, you know send some results, I would like to see a 1 year and YTD backtest
I need a clean, bug-free MT5 Expert Advisor (MQL5) based on this exact mechanical scalping strategy on M5 timeframe for EURUSD. Indicators (built-in): - EMA 9 and EMA 21 on M5 - RSI 14 - ADX 14 (>25 for strong trend) - H1 EMA 21 above/below H1 EMA 9 for trend alignment Entry Rules (ALL must be true): BUY: EMA9 crosses above EMA21 (on closed bar) + RSI > 50 + ADX > 25 + H1 EMA21 > H1 EMA9 SELL: Mirror (cross below
I will like to purchase tradingview strategy with high winning rate, i mean already made, tested and trusted and powerful strategy, i have tried to code my own strategy with lot of freelancers but nothing to me i am just wasting money, i have wasted lot of money already, so i need a high winning rate tradingview strategy, we can discuss price in chat, I will need to see some test result as well
I need a visual web page or program to monitor and analyze multiple MT5 or MT4 trading accounts. A real-time dashboard (real-time visual interface) is required, including account ID, affiliated broker, trading account balance, real-time order quantity, opening price, ongoing order position, spread, profit, etc. If you have mature development experience or source code, let's have a chat, bro
Looking to acquire a good MT5 based EA that works on Gold, forex pairs or BTC. Must be suitable for current market conditions and profitable in backtests. Suitable on 1 Min timeframe to be used on, Must be actively opening many positions throughout the day. Share me the details if this matches something you have or developed. Looking to get this finalised within the weekend
need a dots marking of a simple rules pullback indicator. in the .tpl file look at 28 Jan 2026, TF M5 basically it is just overlaping lows or highs of the previous candle price. there are 2 scenario to accomodate: 1. simple pullbacks 2. pullbacks with inside bar and outside bar involved

Información sobre el proyecto

Presupuesto
30+ USD
Plazo límite de ejecución
a 365 día(s)

Cliente

Encargos realizados1
Número de arbitrajes0