Техническое задание

// Setting the initial parameters
double capital = 1000;
double risk = 0.015; // 1.5% stop loss
double take_profit = 0.10;
double lot_size = 0.10;
int max_executions = 6;

// Calculating the Ichimoku indicator
int period1 = 9;
int period2 = 26;
int period3 = 52;
int period4 = 26;

double tenkan_sen[];
double kijun_sen[];

int init()
{
    // Calculate the Ichimoku indicator
    ArrayResize(tenkan_sen, Bars);
    ArrayResize(kijun_sen, Bars);
    for (int i = 0; i < Bars; i++)
    {
        double ichimoku[4];
        iIchimoku(Symbol(), 0, period1, period2, period3, period4, PRICE_HIGH, ichimoku);
        tenkan_sen[i] = ichimoku[0];
        kijun_sen[i] = ichimoku[1];
    }

    return (0);
}

int start()
{
    // Implementing the trading strategy
    static int position = 0; // 0 represents no position, 1 represents long position
    static int executions = 0; // Number of executions
    double stop_loss, take_profit_price;
    
    for (int i = 1; i < Bars; i++)
    {
        if (tenkan_sen[i - 1] > kijun_sen[i - 1] && tenkan_sen[i] < kijun_sen[i] && position == 0)
        {
            if (executions < max_executions)
            {
                position = 1;
                executions++;
                stop_loss = iClose(Symbol(), 0, i) * (1 - risk);
                take_profit_price = iClose(Symbol(), 0, i) * (1 + take_profit);
                capital -= lot_size * iClose(Symbol(), 0, i); // Entering the market
            }
        }
        else if (tenkan_sen[i - 1] > kijun_sen[i - 1] && tenkan_sen[i] < kijun_sen[i] && position == 1)
        {
            position = 0;
            executions--;
            capital += lot_size * iClose(Symbol(), 0, i); // Exiting the market
        }
        else if (iClose(Symbol(), 0, i) < stop_loss && position == 1)
        {
            position = 0;
            executions--;
            capital += lot_size * stop_loss; // Exiting the market with stop loss
        }
        else if (iClose(Symbol(), 0, i) > take_profit_price && position == 1)
        {
            position = 0;
            executions--;
            capital += lot_size * take_profit_price; // Exiting the market with take profit
        }
    }
    
    // Print the final capital
    Print("Final Capital: $", capital);

    return (0);
}

Откликнулись

1
Разработчик 1
Оценка
(309)
Проекты
394
21%
Арбитраж
44
59% / 23%
Просрочено
48
12%
Загружен
2
Разработчик 2
Оценка
(5)
Проекты
4
50%
Арбитраж
4
0% / 75%
Просрочено
0
Свободен
3
Разработчик 3
Оценка
(90)
Проекты
118
17%
Арбитраж
44
23% / 39%
Просрочено
20
17%
Свободен
4
Разработчик 4
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
5
Разработчик 5
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
6
Разработчик 6
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
Creating a chart composed of different assets, weighted by their trading lot size & quantity. Using this chart to trade the assets in those lot sizes &quantity (by hand or with an EA ) In other words: composing a private index or pair, plotting that as a chart and have the ability to trade it directly with an EA and/or one order click. Inspired by Basket Chart Creator
Hi Would you be able to decompile and/or create a scalper EA with the option I do ask. I had somebody built a EA called Drawdown manager for me that I do use to manage risk of any EA that I test and I have the built code. My problem is that I cannot backtest this EA Fast M1 Gold Scalper and/or cobra adrenaline with the protection that I do include in my Drawdown Manager. To backtest a EA, you can only backtest 1 at
Please I Need A Programmer Who Can Create A Requirement Specification Document For My Trading System THE IDEA OF THE INDICATOR Create A Standard ZigZag Auto Fibo Indicator Combined With A ZigZag Fibonacci Time Zone Indicator Which Has The Specified Levels Written In The Indicator Strategy TEXT FILE/DOCUMENT HOW DOES THE INDICATOR KNOW AN UPTREND MOVEMENT? If Price Hasn't Touched The 123.6% Level Of The Recent Static
THE IDEA OF THE INDICATOR Create A Standard ZigZag Auto Fibo Indicator Combined With A ZigZag Fibonacci Time Zone Indicator Which Has The Specified Levels Written In The Indicator Strategy TEXT FILE/DOCUMENT HOW DOES THE INDICATOR KNOW AN UPTREND MOVEMENT? If Price Hasn't Touched The 123.6% Level Of The Recent Static Uptrend Zig Zag Fibo Retracement Tool Then The Indicator Knows That The Market Is In An Uptrend And
My requirements are the following. I am ordering, I need an expert consultant on EA matters and an indicator in the trade pairs of XAUUSD and XAGUSD, we also need powerful robots for changing prices in the market. the market conditions, i.e. flexibility, then the business should be beneficial for all
QuantumTrader 30 - 200 USD
Request for development of machine learning robots for MetaTrader 5 (MT5) **Description**: Willing to develop experience in programming trading robots using MQL5 language and can learn machine learning on MetaTrader 5 (MT5) platform. The robot should be able to implement a multidisciplinary strategy on a set of technical indicators and multiple rules. I need to develop the robots so that they can work in an
The goal is to develop a system that mirrors trade actions (Buy/Sell) from a CTrader demo account on Cronos Markets to multiple prop firm accounts on TradeLocker, ensuring accurate replication of trades while adjusting risk proportionally. I was wondering if you could help me with copy trading an EA’s action on Cronos markets (uses CTrader) into a prop firm account that I bought with TooOne Trader (uses TradeLocker
Hey Greeting Am in need of Tradingview Developer that can combine existing Tradingview indicator to develop a strategy based on my conditions The Source code of those Indicator is available with me. Kindly bid and let proceed with the project Thanks
I would like to create an Expert Advisor (for MT5) for personal use to manage positions. The utilities will be inspired by the tool below: https://www.mql5.com/en/market/product/23415?source=Site+Market+MT5+Utility+Rating006#description I think the number of options will be smaller, but I am very interested in the following functionality: 1. The ability to read the last highest price (pick) for short positions –
Both way entry with crossover of Multiple EMAs with additional features. Exit shall also be consider based on EMAs, Multiple lot with multiple numbers shall have to consider. News filtering has to be considered with run time and trailing stop loss

Информация о проекте

Бюджет
30+ USD
VAT (20%): 6 USD
Итого: 36 USD
Исполнителю
27 USD
Сроки выполнения
от 30 до 50 дн.