명시

//+------------------------------------------------------------------+
//| SimpleEA.mq5|
//| Copyright 2023, MetaQuotes Software Corp. |
//+------------------------------------------------------------------+
#property copyright "2023, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict

input int FastMAPeriod = 12; // Período da média móvel rápida
input int SlowMAPeriod = 26; // Período da média móvel lenta
input double LotSize = 0.1; // Tamanho do lote

double FastMA, SlowMA;

//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
  {
   //--- initialization of indicators
   FastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
   SlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
   
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   //---
  }
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
  {
   FastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
   SlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
   
   double previousFastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
   double previousSlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
   
   if (previousFastMA < previousSlowMA && FastMA > SlowMA)
   {
      if (OrderSelect(0, SELECT_BY_POS, MODE_TRADES) == false)
      {
         OrderSend(Symbol(), OP_BUY, LotSize, Ask, 2, 0, 0, "Buy Order", 0, 0, clrGreen);
      }
   }
  }
//+------------------------------------------------------------------+

응답함

1
개발자 1
등급
(32)
프로젝트
55
5%
중재
35
0% / 94%
기한 초과
24
44%
작업중
2
개발자 2
등급
(153)
프로젝트
236
33%
중재
20
45% / 30%
기한 초과
1
0%
작업중
3
개발자 3
등급
(550)
프로젝트
637
33%
중재
41
41% / 46%
기한 초과
11
2%
바쁜
4
개발자 4
등급
(94)
프로젝트
130
9%
중재
8
25% / 38%
기한 초과
28
22%
작업중
5
개발자 5
등급
(11)
프로젝트
17
59%
중재
2
0% / 100%
기한 초과
2
12%
무료
6
개발자 6
등급
프로젝트
1
100%
중재
0
기한 초과
0
무료
7
개발자 7
등급
(48)
프로젝트
49
8%
중재
0
기한 초과
0
무료
비슷한 주문
1️⃣ OVERVIEW Platform: MetaQuotes MetaTrader 5 Language: MQL5 Timeframe: H1 (hard-coded default, but parameterized) Default Symbol: EURUSD (must support any symbol) Execution Mode: Market Execution 2️⃣ CORE PHILOSOPHY System optimized for: Capturing expansion after pullback Maximizing R multiple Allowing volatility-based scaling static datetime lastBarTime; if(Time[0] != lastBarTime) { lastBarTime = Time[0]; //
1️⃣ OVERVIEW Platform: MetaQuotes MetaTrader 5 Language: MQL5 Timeframe: H1 (hard-coded default, but parameterized) Default Symbol: EURUSD (must support any symbol) Execution Mode: Market Execution 2️⃣ CORE PHILOSOPHY System optimized for: Capturing expansion after pullback Maximizing R multiple Allowing volatility-based scaling Accepting moderate-to-high drawdown No: Martingale Grid Hedging 3️⃣ INPUT PARAMETERS 🔹
Tenho um indicador e quero fazer um expert dele para rodar automático porem só tenho o arquivo .ex4 e não .mq4 Indicador mostra setas no grafico no momento ideal para comprar e vender

프로젝트 정보

예산
30+ USD
기한
에서 15  35 일