Spécifications
//+------------------------------------------------------------------+
//| MyBot.mq5 |
//| Created using MQL5 |
//+------------------------------------------------------------------+
#include <Trade\Trade.mqh>
CTrade trade; // Create a trade object
// Define input parameters
input int FastMAPeriod = 10;
input int SlowMAPeriod = 50;
input int RSI_Period = 14;
input int MACD_FastEMA = 12;
input int MACD_SlowEMA = 26;
input int MACD_SignalSMA = 9;
// Function to calculate support and resistance (simple example)
double FindSupport(int candles) {
double lowest = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, candles, 0));
return lowest;
}
double FindResistance(int candles) {
double highest = iHigh(NULL, 0, iHighest(NULL, 0, MODE_HIGH, candles, 0));
return highest;
}
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit() {
return INIT_SUCCEEDED;
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick() {
// Get current prices
double priceCurrent = iClose(NULL, 0, 0);
double priceHigh = iHigh(NULL, 0, 10); // High over the past 10 candles
double priceLow = iLow(NULL, 0, 10); // Low over the past 10 candles
// Calculate indicators
double FastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
double SlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
double RSI = iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, 0);
double MACD_Main, MACD_Signal;
MACD_Main = iMACD(NULL, 0, MACD_FastEMA, MACD_SlowEMA, MACD_SignalSMA, PRICE_CLOSE, MODE_MAIN, 0);
MACD_Signal = iMACD(NULL, 0, MACD_FastEMA, MACD_SlowEMA, MACD_SignalSMA, PRICE_CLOSE, MODE_SIGNAL, 0);
// Calculate stop-loss and take-profit distances
double SL_Distance = MathAbs(priceCurrent - (priceHigh + priceLow) / 2);
double TP_Distance = SL_Distance * 2; // Minimum TP, adjustable
// Check Buy Condition
if (FastMA > SlowMA && RSI > 30 && RSI < 70 && MACD_Main > MACD_Signal) {
double tpLevel = priceCurrent + TP_Distance;
double slLevel = priceCurrent - SL_Distance;
// Ensure TP is below the nearest resistance level
double resistance = FindResistance(20);
if (tpLevel > resistance) {
tpLevel = resistance;
}
trade.Buy(0.1, priceCurrent, slLevel, tpLevel, "Buy Order");
}
// Check Sell Condition
if (FastMA < SlowMA && RSI > 30 && RSI < 70 && MACD_Main < MACD_Signal) {
double tpLevel = priceCurrent - TP_Distance;
double slLevel = priceCurrent + SL_Distance;
// Ensure TP is above the nearest support level
double support = FindSupport(20);
if (tpLevel < support) {
tpLevel = support;
}
trade.Sell(0.1, priceCurrent, slLevel, tpLevel, "Sell Order");
}
}
Répondu
1
Évaluation
Projets
111
50%
Arbitrage
26
31%
/
50%
En retard
9
8%
Gratuit
Publié : 1 article
2
Évaluation
Projets
23
39%
Arbitrage
4
25%
/
50%
En retard
1
4%
Gratuit
Publié : 5 codes
3
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
4
Évaluation
Projets
33
27%
Arbitrage
20
10%
/
50%
En retard
11
33%
Gratuit
5
Évaluation
Projets
0
0%
Arbitrage
2
0%
/
100%
En retard
0
Gratuit
6
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
C'est un Expert Advisor (EA) MQL5 pour MetaTrader 5, conçu pour l' XAUUSD , combinant un filtre de tendance et une grille adaptative avec gestion de panier ("basket") et protections contre le drawdown. Version 1.00. Logique de trading Filtre de tendance (H4 par défaut) • EMA rapide (50) vs EMA lente (200) pour déterminer la direction (UP/DOWN) • Filtre ADX (période 14, seuil 18) pour éviter de trader en
Modify EA for pending orders
30+ USD
My EA is semi Auto EA..with Master and slave concept Using Heiken Ashi +Heiken Smooth and Moving Average What to do?1. Remove some previous feature 2.Change some rules of 4 slave to pending Order 3. Check the coding is clean. 4. create panel dialog box
I currently sell a white-label XAUUSD EA, but the existing supplier owns the source code. I now need a new, independently developed EA and licensing system that my company fully owns and controls. I am not requesting decompilation or copying of proprietary code. Existing settings, presets and trading examples will be provided as reference. The developer must first identify any missing strategy rules before
it starts with a directional Buy or Sell entry, then uses grid/martingale for recovery if needed. X also has updated risk controls and filters. Only Experts Allowed please. No Newbies also Drop your Quotes
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
I am looking to acquire an EXISTING and PROVEN MetaTrader 5 Expert Advisor. I am NOT looking for someone to develop a random new strategy from scratch. The objective is to find a robust EA with an existing track record, verify its performance and robustness, and purchase the MQL5 source code together with clearly defined commercial rights. MAIN REQUIREMENTS The EA should meet most or all of the following
Looking to acquire an existing, proven EA. Not looking for new strategy development. REQUIREMENTS — non-negotiable: Minimum 12 months verified LIVE history (Myfxbook or MQL5 Signals, real money — not demo, not backtest) Hard stop loss on EVERY trade, set at order placement NO martingale, NO grid, NO averaging into losers, NO lot multiplication after a loss Max historical drawdown under 30% Minimum 5 trades per
Scalping Reaction Zones + Valid Order Blocks
30 - 150 USD
Platform: TradingView Programming Language: Pine Script v6 Type: Custom Indicator Project Name: Scalping Reaction Zones + Valid Order Blocks MAIN GOAL I need a custom TradingView indicator for scalping. The indicator must detect: 1. Reaction / Explosion Zones 2. Valid Order Blocks 3. Combined Reaction Zone + Order Block zones The indicator should NOT generate: Buy signals Sell signals TP SL Entry signals Trading
Hello, I trade on HFM MT5. Need SCALPING EA for scalping, budget $30. SYMBOLS: XAUUSD (GOLD), US30, NAS100, GER40, EURUSD TIMEFRAME: M1 and M5 PLATFORM: MT5, must work on HFM VPS STRATEGY: - EMA 9 crosses EMA 21 - RSI 14: BUY only if RSI >45, SELL only if RSI <55 - Bollinger Bands: Only trade when price returns inside BB after breakout - 1 trade at a time per symbol - SL: 150 points Gold / 100 points indices (must be
Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and
Informations sur le projet
Budget
30 - 50 USD