Specification

// Forex Strategy for Consistency in Profit

// Input parameters
input int FastMAPeriod = 10; // Period for the fast moving average
input int SlowMAPeriod = 30; // Period for the slow moving average
input double StopLossPips = 50; // Stop loss in pips
input double TakeProfitPips = 100; // Take profit in pips

// Global variables
int ticket = 0; // Order ticket number

// Indicator buffers
double fastMABuffer[];
double slowMABuffer[];

// Initialization function
int OnInit()
{
    // Define indicator buffers
    SetIndexBuffer(0, fastMABuffer);
    SetIndexBuffer(1, slowMABuffer);
    
    // Set indicator plot type
    SetIndexStyle(0, DRAW_LINE);
    SetIndexStyle(1, DRAW_LINE);
    
    // Set indicator colors
    SetIndexLabel(0, "Fast MA");
    SetIndexLabel(1, "Slow MA");
    SetIndexDrawBegin(0, SlowMAPeriod);
    SetIndexDrawBegin(1, SlowMAPeriod);
    
    // Set indicator parameters
    SetIndexShift(0, 0);
    SetIndexShift(1, 0);
    SetIndexEmptyValue(0, 0);
    SetIndexEmptyValue(1, 0);
    
    // Return successful initialization
    return INIT_SUCCEEDED;
}

// Trading function
void OnTick()
{
    // Calculate moving averages
    ArraySetAsSeries(fastMABuffer, true);
    ArraySetAsSeries(slowMABuffer, true);
    int fastMA = iMA(Symbol(), 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE);
    int slowMA = iMA(Symbol(), 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE);
    
    // Check for a crossover
    if (fastMA > slowMA && fastMABuffer[1] <= slowMABuffer[1])
    {
        // Close any existing positions
        if (ticket > 0 && OrderSelect(ticket, SELECT_BY_TICKET))
        {
            if (OrderClose(ticket, OrderLots(), OrderClosePrice(), Slippage, Red))
            {
                ticket = 0; // Reset ticket number
            }
        }
        
        // Open a new buy position
        ticket = OrderSend(Symbol(), OP_BUY, 0.1, Ask, Slippage, Ask - StopLossPips * Point, Ask + TakeProfitPips * Point, "Buy Order", 0, 0, Green);
    }
    else if (fastMA < slowMA && fastMABuffer[1] >= slowMABuffer[1])
    {
        // Close any existing positions
        if (ticket > 0 && OrderSelect(ticket, SELECT_BY_TICKET))
        {
            if (OrderClose(ticket, OrderLots(), OrderClosePrice(), Slippage, Red))
            {
                ticket = 0; // Reset ticket number
            }
        }
        
        // Open a new sell position

        ticket = OrderSend(Symbol(), OP_SELL, 0.1, Bid, Slippage, Bid + StopLossPips * Point, Bid - TakeProfitPips * Point, "Sell Order


Responded

1
Developer 1
Rating
(43)
Projects
65
11%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
2
Developer 2
Rating
(26)
Projects
32
28%
Arbitration
4
75% / 25%
Overdue
6
19%
Free
3
Developer 3
Rating
(2)
Projects
2
0%
Arbitration
1
0% / 0%
Overdue
2
100%
Free
4
Developer 4
Rating
(535)
Projects
613
34%
Arbitration
34
38% / 47%
Overdue
9
1%
Busy
5
Developer 5
Rating
(568)
Projects
641
41%
Arbitration
23
52% / 30%
Overdue
46
7%
Working
6
Developer 6
Rating
(5)
Projects
4
50%
Arbitration
4
0% / 75%
Overdue
0
Free
Similar orders
I need an Expert advisor based on AOX signal . it must have check and handing of trade operation..errors. The main criterin for opening and dosing a position : moving average direction the price is higher than the previous bar Trade lots is input parameter bar
I Have A project done dusted For sale; Title: Strong Reversal Indicator [No Repaint, No Offset, Low Lag] 17 minutes ago MQL5 Indicators Design Forex Trading robot/indicator debugging Strategy optimization Statistics and mathematics Strategy modules Uploading data to a website Specification EN Overview: A professional MT5 reversal indicator designed to detect market turning points with no repainting, no
Manage my live forex account with a disciplined, low-risk approach that produces steady monthly income. My priority is capital protection, so each trade must be sized conservatively, anchored by firm stop-loss orders, and designed to keep drawdown minimal. High-risk tactics such as martingale, grid systems, or excessive leverage are off the table; a measured, rules-based strategy is essential. I will connect the
Indicator that finds zones. All details in word document Ask questions if need I’d also like to to change from finding bullish marker and main candles to bearish marker and main candles if price crosses past inputted price The document is showing zones for bullish price action. Id like to also change manually in setting for it to show bearish price action ( it will look for bullish candle markers and main) Zones
I already have an Expert Advisor coded in MQL4, but it refuses to trade anything other than its hard-coded symbol. I want that filter gone so the same strategy can fire on any instrument—forex, indices, metals such as XAUUSD—across any timeframe. The trading logic, money management and inputs must stay exactly as they are; I simply need universal symbol support. After the MT4 file is fixed and compiles cleanly, I
Description: Gildepak is a purchasing cooperative for packaging materials. We need a program to calculate and fairly distribute the annual bonus (received from preferred suppliers) among our member companies (partners and members). The program should work with a set of predefined tables and data flows, and it must be able to import and export Excel files. Main Tables: Member Companies Company ID Company Name Partner
Fractal Multi-Timeframe Strategy (H4→M15→M2) — Developer Spec Abstract This document specifies a fractal trading workflow leveraging H4 for regime identification, M15 for Area of Value (AoV) location, and M2 for execution using CHoCH-based triggers. The goal is a robust, developer-friendly specification that minimizes ambiguity and matches the operational style already discussed (Liquidity → Order Block →
Tk capital bot 50+ USD
Trading bot for trading and forex trading and other markets trade with low accounts risk management and accuracy trade in a multiple account and enter a trade when it's necessary
Ethereum EA 30 - 35 USD
I am looking for an Expert Advisor (EA) that performs well on Ethereum. Ideally it should be an HFT-style EA; a swing trading EA is acceptable. I require the full MQL5 source code — the EA must be written entirely in MQL5 (no external languages such as Python). Performance target: minimum 70% win rate with a 1:1 risk:reward. Input variables required: - Stop Levels: Stop Loss (SL) and Take Profit (TP) - Trailing stop
I used AI to develop my EA, and I need a professional developer to review my Expert Advisor code for MT5 (Python experience preferred). I will provide details once contact is initiated. Thanks. Benga

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
from 1 to 30 day(s)