Spezifikation

// 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


Bewerbungen

1
Entwickler 1
Bewertung
(42)
Projekte
62
8%
Schlichtung
12
58% / 42%
Frist nicht eingehalten
1
2%
Frei
2
Entwickler 2
Bewertung
(24)
Projekte
29
24%
Schlichtung
3
67% / 33%
Frist nicht eingehalten
6
21%
Arbeitet
3
Entwickler 3
Bewertung
(2)
Projekte
2
0%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
2
100%
Frei
4
Entwickler 4
Bewertung
(489)
Projekte
560
33%
Schlichtung
27
44% / 44%
Frist nicht eingehalten
9
2%
Beschäftigt
5
Entwickler 5
Bewertung
(568)
Projekte
641
41%
Schlichtung
22
55% / 32%
Frist nicht eingehalten
47
7%
Arbeitet
6
Entwickler 6
Bewertung
(5)
Projekte
4
50%
Schlichtung
4
0% / 75%
Frist nicht eingehalten
0
Frei
Ähnliche Aufträge
I Need An Expert Advisor That Creates Multiple Buy Stop, Buy Limit, Sell Stop And Sell Limit Orders Automatically for example if price reach 2659.22 enter auto buy stop with auto tp and sl
I need an indicator like the one of the two photos that print on current candle 0, or pre alert 60% win rate minimum for mt5 or 4 I would like too trail until Friday as this is when I get paid pls
Nt8 30+ USD
i'm searching a way to define which IP address is using by NT8 cause i'm using a multiple IPs machine (for my daily job) and I'd need to have a further confirmation that I'm using the correct IP address with NT8 could anyone explain explain me how to do it for a fee
I need a developer with FxDreema experience to build an MT5 EA that: Manages recovery zones with pending buy/sell orders. Implements trailing stops, pre-defined profit lines, and dynamic lot sizing. Supports money management based on account balance and lot size and money value. Offers options for continuous or stop trading. The developer must provide the source code and FxDreema link . More specific details will be
Ea already has it way of placing order by putting pending orders when candle open in the direction of the previous candle .All function of the ea should be maintained nothing should change. I want ea should have a compounding order function,which allow ea place multiple pending order in the form of grid with a compounding pips interval function(the distance between two pending orders) in accordance to original ea
I need to create an EA based on my own strategy that actually is a little bit different from most of the usual EA. This because it use an indicator but the power of the system is just because it can shows target price by designing trendline on the price chart in a unusual way. A friend of mine tried to create it on MT4 platform but, in the end, he realized that this platform has big limits when the program lines
This is a 2000 lines own-made breakout EA that I need to have cleanly converted from mql4 to mql5 for learning purposes The start() is about 400 lines long ; basic breakout with specific features , built for Index CFDs with 2 digits (typically DAX or SP500; TP SL... are expressed in actual Points) The Ontester() is about 400 lines (contains 58 different custom opimizations) The Deinit() is about 150 lines The
I'm looking for an MQL5 expert to develop a trading EA that uses the ratio of candle wicks to body sizes to automatically enter and exit trades. Key features should include: - Autopilot function: The EA should handle trade entries without manual intervention. Trade exits are only by hitting trailing SL. - Trade criteria: Trades should only be placed based on specific, pre-defined ratios of candle wicks to body sizes
Convert my tradingview pine script to mt4, Its a simple and straight code i need an expert programmer to convert my tradingview pine script to mt4, Thats All Thank you
Hello, i would like to have a fix on my plotted lines I use a liquidity strategy on the 1 hr time frame but the indicator that i am using for plotting the 1 hr lines is having a issue and printing the plot lines all over the place on the current 1 and 4 hr plot line as you can see in the screenshot this is very disturbing while i am trading can u fix that or just remove the current 1 hr plot line ?and or only show

Projektdetails

Budget
30+ USD
Für die Entwickler
27 USD
Ausführungsfristen
von 1 bis 30 Tag(e)