Griffinsmmbulika

MQL5 전문가

명시

//+------------------------------------------------------------------+
//| Simple MA Crossover EA with Risk Management (MT5)                |
//+------------------------------------------------------------------+
#property strict

// === INPUTS ===
input double RiskPercent   = 1.0;     // Risk per trade (%)
input int    FastMAPeriod  = 20;
input int    SlowMAPeriod  = 50;
input int    StopLossPips  = 50;
input int    TakeProfitPips= 100;
input int    MagicNumber   = 123456;

// === GLOBALS ===
int fastMA, slowMA;

//+------------------------------------------------------------------+
int OnInit()
{
   fastMA = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
   slowMA = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
void OnTick()
{
   if (PositionsTotal() > 0) return;

   double fastMA_current = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
   double fastMA_prev    = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);
   double slowMA_current = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 0);
   double slowMA_prev    = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE, 1);

   double lotSize = CalculateLotSize();

   // BUY SIGNAL
   if (fastMA_prev < slowMA_prev && fastMA_current > slowMA_current)
   {
      BuyTrade(lotSize);
   }

   // SELL SIGNAL
   if (fastMA_prev > slowMA_prev && fastMA_current < slowMA_current)
   {
      SellTrade(lotSize);
   }
}

//+------------------------------------------------------------------+
double CalculateLotSize()
{
   double balance = AccountInfoDouble(ACCOUNT_BALANCE);
   double riskMoney = balance * RiskPercent / 100.0;
   double pipValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
   double lot = riskMoney / (StopLossPips * pipValue);
   return NormalizeDouble(lot, 2);
}

//+------------------------------------------------------------------+
void BuyTrade(double lot)
{
   double price = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
   double sl = price - StopLossPips * _Point;
   double tp = price + TakeProfitPips * _Point;

   trade.Buy(lot, _Symbol, price, sl, tp, "MA Buy");
}

//+------------------------------------------------------------------+
void SellTrade(double lot)
{
   double price = SymbolInfoDouble(_Symbol, SYMBOL_BID);
   double sl = price + StopLossPips * _Point;
   double tp = price - TakeProfitPips * _Point;

   trade.Sell(lot, _Symbol, price, sl, tp, "MA Sell");
}

응답함

1
개발자 1
등급
(208)
프로젝트
310
34%
중재
59
36% / 39%
기한 초과
100
32%
로드됨
2
개발자 2
등급
(4)
프로젝트
4
0%
중재
1
0% / 100%
기한 초과
0
무료
3
개발자 3
등급
(4)
프로젝트
3
33%
중재
2
0% / 100%
기한 초과
0
무료
4
개발자 4
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
5
개발자 5
등급
(11)
프로젝트
16
25%
중재
1
0% / 100%
기한 초과
1
6%
무료
6
개발자 6
등급
프로젝트
0
0%
중재
1
0% / 100%
기한 초과
0
작업중
7
개발자 7
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
비슷한 주문
hello every one i have a sample strategy i need a expert for automatical trade on vps pls let me know if every one can summer of expert : mixed 2 EMA and hicenashi + money managment i will need test befor pay
Looking for an experienced developer to build an AI-driven trading system for MetaTrader 5. The bot should be able to: Analyze market structure (accumulation, manipulation, distribution) and 45-min pullback zones (25%, 50%, 70%) for trade decisions Integrate with Bookmap via API for real-time order flow, liquidity, and footprint data
*I am looking for an experienced MQL5 developer to build a custom Expert Advisor (EA) for MetaTrader 5 based on my proprietary trading strategy. The full strategy details will be shared privately with the selected developer after agreement. The EA must be designed for automated trade execution with a strong focus on accuracy, speed, and stability. It should support flexible input settings and allow for future
Hello, I am seeking assistance in setting up a trade copier or bridge to facilitate the copying of trades from MetaTrader 5 to the Tradovate platform. I am looking for someone who can help automate my trading process, allowing trades generated by my Expert Advisor in MT5 to be copied to different accounts on Tradovate using their API.Something like in the attached image
📋 Project Description I am looking for an experienced MT5 (MQL5) developer to code a fully automated Expert Advisor for NASDAQ (US100) based on a fixed, rule-based opening range breakout strategy. The strategy is mechanical, uses no discretionary logic, and must be coded exactly as specified below. 🕒 Time & Session Rules Market: NASDAQ (US100) Trading days: Monday–Friday Session open: 9:30 EST EA must convert
I am looking for a professional developer to build a custom trading analysis software for me. This tool is NOT an automated trading bot (EA); it is an analysis dashboard to help me identify high-probability setups based on my strategy. Key Requirements: Multi-Timeframe Analysis: The software should scan 4 different timeframes (M15, M30, H1, H4, D1, WK1, MTH1) and alert me when my conditions are met. Indicator
Looking for an experienced developer to build an AI-driven trading system for MetaTrader 5. Have to finalize the trading logic (market structure, pullback zones, sessions, order-flow confirmation), then build the AI framework to learn from live trade results
I want to add and remove few things in ea need some modification needed in ea developer should have some trading knowledge also to understand the requirement better and have good experience in coding
hello great developer Project Description (What to Post) Develop a TradingView-to-Binance Spot trading bot that executes trades automatically based on Buy and Sell signals from a TradingView indicator. Bot Logic & Requirements: Exchange: Binance Spot Signal Source: TradingView alerts (webhook) Indicator: TonyUX EMA Scalper Order Size: Percentage of available account balance Trade Logic: On Buy signal → open a Buy
hi every one i need to get the source code from this ea for modification in meta trader 4 or meta trader 5. because i need to put in settings the number of open trades , as this is now opening unlimited trades

프로젝트 정보

예산
30+ USD

고객

넣은 주문1
중재 수0