İş Gereklilikleri

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


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(42)
Projeler
62
8%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
2
Geliştirici 2
Derecelendirme
(24)
Projeler
29
24%
Arabuluculuk
3
67% / 33%
Süresi dolmuş
6
21%
Serbest
3
Geliştirici 3
Derecelendirme
(2)
Projeler
2
0%
Arabuluculuk
1
0% / 0%
Süresi dolmuş
2
100%
Serbest
4
Geliştirici 4
Derecelendirme
(454)
Projeler
513
33%
Arabuluculuk
26
38% / 46%
Süresi dolmuş
7
1%
Yüklendi
5
Geliştirici 5
Derecelendirme
(568)
Projeler
641
41%
Arabuluculuk
21
57% / 29%
Süresi dolmuş
47
7%
Çalışıyor
6
Geliştirici 6
Derecelendirme
(5)
Projeler
4
50%
Arabuluculuk
4
0% / 75%
Süresi dolmuş
0
Serbest
Benzer siparişler
I believe in Robotics as a major artificial intellect to function of growth of business.Therefore if you script there is a likelihood of bringing economies of scale.The retrospective of the dynamics of indulgence of work can be economics of scale
looking for help to get my ibkr automated, i have strategies already built in composer and have JSON for them, i really just need to he setup and explanation on how to maintain it and add new strategies
Hi I need a software like Mirror trade copier ( https://www.antonnel.net/mirror/ ) which directly connect to the Accounts over api with out MT4 terminal and copies trades from mater to client. I want the same and possible improvement like can be accessed over a url and dashboard for some basic metrics (optional)
An EA based on Fibonacci 100 - 300 USD
I am in need of 2 EA based on Fibonacci re-tracement after a high or low is made,each EA will have a hedge trade on it.the hedge trade will be at the 38 percent of the Fibonacci..this will be present on the 2 EA, the 2 EA will have different levels of re-tracement, while the hedge trade will be a continuation (buy/sell stop), while the re-tracement trades will be (buy/sell limit)This EA must work on timeframe ranging
DJANGO EA 30 - 1000 USD
I need smart, professional, and fast programmer for doing this project quickly, that have experience in EA with minimum 500 projects finish, and have good review and reputation from their client Share your link review, if you not qualified, dont apply! I will bidding the programmer from experience, review, reputation, price, and days working My EA using Moving Average, Average True Range, and using consecutives

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD
Son teslim tarihi
from 1 to 30 gün