Spezifikation

//+------------------------------------------------------------------+
//|                                                      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");
    }
}

Bewerbungen

1
Entwickler 1
Bewertung
(65)
Projekte
93
52%
Schlichtung
11
36% / 27%
Frist nicht eingehalten
8
9%
Frei
2
Entwickler 2
Bewertung
(3)
Projekte
5
0%
Schlichtung
0
Frist nicht eingehalten
1
20%
Arbeitet
3
Entwickler 3
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
4
Entwickler 4
Bewertung
(6)
Projekte
5
20%
Schlichtung
2
0% / 0%
Frist nicht eingehalten
0
Überlastet
5
Entwickler 5
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Arbeitet
6
Entwickler 6
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
Ivy indicator 30 - 200 USD
This is the most important section of Requirements Specification. It provides the description of conditions, market states and indicator values, under which a Buy deal should be performed. To describe each condition required for generating a Buy signal, choose the numeric parameter affecting the emergence of a signal. For example, this may be the smoothing type and period for a Moving Average. These important
This Robot enhance super speed profitable Auto trading and it's 100% reliable and superfast. Elon Musk Auto Pilot is one in a millions plus several attribute enforcing massive 5mins time frame super active
Specify your Requirements Specification here point by point. Try to describe your requirements briefly and clearly, so that your potential developer is able to correctly assess its complexity and cost, as well as the required execution time. A bad or too generic description will result in your order being ignored, or you will spend a lot of time negotiating the details with each applicant. Remember: It is better to
Helo Great Developer I coded my strategy on tradingview I would like to convert it to mql5 because with pine connect I can't do it Basically, I started with an indicator called mtf crytpo sea. look in tradingview a little how it works my problem is that I have no parameter for the batch according to my risk
FXSTATE_TESTER 100+ USD
Specify your Requirements Specification here point by point. Try to describe your requirements briefly and clearly, so that your potential developer is able to correctly assess its complexity and cost, as well as the required execution time. A bad or too generic description will result in your order being ignored, or you will spend a lot of time negotiating the details with each applicant. Remember: It is better to
FXSTATE_TESTER 100+ USD
Specify your Requirements Specification here point by point. Try to describe your requirements briefly and clearly, so that your potential developer is able to correctly assess its complexity and cost, as well as the required execution time. A bad or too generic description will result in your order being ignored, or you will spend a lot of time negotiating the details with each applicant. Remember: It is better to
I will like to have EA that trade based on order flow/order block putting pending orders waiting for price to fill in the imbalancement left behind by makert makers and stop loss at 25 pips take profit at 25pips
Introduction This EA has 2 strategies, namely STRATEGY 1 AND STRATEGY 2 , and allows the user to choose ONLY 1 strategy to trade. These strategies are different because they have different calculation methods to determine the price levels for EA to open the pending BUY and SELL LIMIT orders at the OPEN of a daily candle. The EA trading and operation logics ARE THE SAME for these 2 strategies. This EA is a
Hi, I Need a simple Expert Adviser to trade on price only, no indicators. When activated, the EA simultaneously places 2 pending orders. One is placed as a Buy above the price, and the other is placed as a Sell below (eg; 20 pips, variable). Each order has "parental control" over the other (meaning, when one order is triggered, it cancels out the other). Both pending orders have a trailing stop (eg; 30 pips
Fx Melvin 90 - 100 USD
Hie... l want a trading robot that can trade bot currencies and indices.. it must be able to open and close positions on it's own aswell as capitalising on both directions either buy or sell on each candle stick scalping..it must work 24/7

Projektdetails

Budget
30 - 50 USD

Kunde

Veröffentlichte Aufträge1
Anzahl der Schlichtungen0