Modify Code so that it Performs the Same as the Attached Indicator

MQL5 指标 专家

工作已完成

执行时间1 一天
客户反馈
Good developer, recommend to anyone
员工反馈
Great customer. Clear description of requirement specification, fast communication. Looking forward to working with you again. Thanks

指定

This is a very straight forward request.

What I need is for the Bollinger Bands Buy / Sell functions below to perform the same as the indicator that is attached.

Delivery will comprise of a video / demonstration that the functions will work within an expert advisor / work in a similar manner to the indicator.

I've shared the following below:

  • Photo of Indicator (ibbfill2)
  • Functions Bollinger Bands Buy / Sell (these functions should match the conditions of the ibbfill2 indicator (i.e. when the Indicator shades Blue - that is the same as Bollinger Bands Buy / vice versa for Bollinger Bands Sell)
  • iBandsMQL4 Function (because MT5 does not have shift / a proper way to indicate the MAIN / UPPER / LOWER Bound) I have created this function. Note if you have an alternative, feel free to replace this.


Photo of Indicator:

Indicator Example



Functions - Bollinger Bands Buy & Sell:

bool BollingerBandsBuy(string symb)
{
    bool state = false;

    double bid = SymbolInfoDouble(symb, SYMBOL_BID);
    double ask = SymbolInfoDouble(symb, SYMBOL_ASK);
    double close = iClose(symb, PERIOD_M5, 1);

    static bool conditionMet[12]; // Array to store conditionMet for each symbol
    string symbols_group[] = {symb1, symb2, symb3, symb4, symb5, symb6, symb7, symb9, symb10, symb11, symb12 };
    int numSymbols = ArraySize(symbols_group);

    if (ArraySize(conditionMet) != numSymbols)
    {
        ArrayResize(conditionMet, numSymbols);
    }

    int symbolIndex = -1;
    for (int i = 0; i < numSymbols; i++)
    {
        if (symb == symbols_group[i])
        {
            symbolIndex = i;
            break;
        }
    }

    if (symbolIndex == -1)
    {
        Print("Symbol not found in the group.");
        return false;
    }

    //------------------------------------------------------------------------

    double iBandsMain1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 0, 1);
    double iBandsUpper1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 1, 1);
    double iBandsLower1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 2, 1);

    //------------------------------------------------------------------------

    //---------------------- Buy Condition Initial Trigger -------------------

    if (close > iBandsUpper1)
    {
        conditionMet[symbolIndex] = true;
    }
    else if (close < iBandsMain1)
    {
        conditionMet[symbolIndex] = false;
    }

    //---------------------- Condition Start ---------------------------

    if (conditionMet[symbolIndex] && ask > iBandsMain1)
    {
        state = true;
    }

    return state;
}


//-------------------------------------------------------------------------------------------------------------++

bool BollingerBandsSell(string symb)
{
    bool state = false;

    double bid = SymbolInfoDouble(symb, SYMBOL_BID);
    double ask = SymbolInfoDouble(symb, SYMBOL_ASK);
    double close = iClose(symb, PERIOD_M5, 1);

    static bool conditionMet[12]; // Array to store conditionMet for each symbol
    string symbols_group[] = {symb1, symb2, symb3, symb4, symb5, symb6, symb7, symb9, symb10, symb11, symb12 };
    int numSymbols = ArraySize(symbols_group);

    if (ArraySize(conditionMet) != numSymbols)
    {
        ArrayResize(conditionMet, numSymbols);
    }

    int symbolIndex = -1;
    for (int i = 0; i < numSymbols; i++)
    {
        if (symb == symbols_group[i])
        {
            symbolIndex = i;
            break;
        }
    }

    if (symbolIndex == -1)
    {
        Print("Symbol not found in the group.");
        return false;
    }

    //------------------------------------------------------------------------

    double iBandsMain1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 0, 1);
    double iBandsUpper1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 1, 1);
    double iBandsLower1 = iBandsMQL4(symb, PERIOD_M15, 20, 2, 2, 1);

    //------------------------------------------------------------------------

    //---------------------- Buy Condition Initial Trigger -------------------

    if (close < iBandsLower1)
    {
        conditionMet[symbolIndex] = true;
    }
    else if (close > iBandsMain1)
    {
        conditionMet[symbolIndex] = false;
    }

    //---------------------- Condition Start ---------------------------

    if (conditionMet[symbolIndex] && close < iBandsMain1)
    {
        state = true;
    }

    return state;
}

  • Note: I have added a conditionMet function to this so that I can store the boolean for the first time it exceeds the Upper Bollinger Band. I need this to work with multicurrencies hence the array that contains 12 symbols.


iBands MQL4 Function:

double iBandsMQL4(string symb, ENUM_TIMEFRAMES tf, int period, double StdDeviation, int line, int shift) 
{
    ENUM_TIMEFRAMES timeframe3 = TFMigrate(tf);

    int handleBB = iBands(symb, timeframe3, period, 0, StdDeviation, PRICE_CLOSE);

    double bbUpper[], bbLower[], bbMiddle[];
    ArraySetAsSeries(bbUpper, true);
    ArraySetAsSeries(bbLower, true);
    ArraySetAsSeries(bbMiddle, true);

    CopyBuffer(handleBB, BASE_LINE, 1, shift + 1, bbMiddle);
    CopyBuffer(handleBB, UPPER_BAND, 1, shift + 1, bbUpper);
    CopyBuffer(handleBB, LOWER_BAND, 1, shift + 1, bbLower);

    double iBandsValue;

    if (line == 0)
    {
        iBandsValue = NormalizeDouble(bbMiddle[shift], SymbolInfoInteger(symb, SYMBOL_DIGITS));
    }
    else if (line == 1)
    {
        iBandsValue = NormalizeDouble(bbUpper[shift], SymbolInfoInteger(symb, SYMBOL_DIGITS));
    }
    else if (line == 2)
    {
        iBandsValue = NormalizeDouble(bbLower[shift], SymbolInfoInteger(symb, SYMBOL_DIGITS));
    }
    else
    {
        iBandsValue = 0.0; // Default value in case of invalid line parameter
    }
   
    return iBandsValue;
}



反馈

1
开发者 1
等级
(137)
项目
160
23%
仲裁
6
0% / 50%
逾期
4
3%
已载入
2
开发者 2
等级
(289)
项目
430
63%
仲裁
5
40% / 0%
逾期
4
1%
已载入
相似订单
Ind V5 TV Strategy Requirements: Instruments: Forex pairs, Crypto and Stocks across exchanges TimeFrame: Multi-Time Frame comparisons, details below Indicators: Ichimoku Cloud, ATR & Choppiness Index Trade times: First Order: Day of Week Start Time, Day of Week First Order time, Day of Week Last Order Time and Day of Week Square Off Time Intraday TF: 1 min, 3 mins, 9 mins, 27 mins and 81 mins Position Size (Lots)
I want this EA in mql4. The two indicators are written in pinescript Developer should please understand it to develop the EA. One of the indicator will be used as direction and the other for entry. The should have code that it can be used for( only one PC and an expiration date. ; this the developer should show me how to adjust it, so that I can adjust to my preference). Parameters:number of trades.lotsize, SL pips
I need a robot for forex trading~~The way the robot should work is that when I put it into a 5 minute chart, the chart will show 15 minutes, one hour, Regardless of whether they are buying or selling, they must buy or sell in the same color at the same time~~~ Use the following indicators: HalfTrend 1 & alerts mtf Trafficlight indicator.MQ4 When placed into a 5 minute chart ~ the chart will show 15 minutes, one
I am looking for a programmer to do EA trader. If you can understand what I want from the video i do and you can do it, contact me because you will be able to do what I want. https://drive.google.com/file/d/1wbHxbUQQqCkdpr0-pHfIh2b288LzYTV2/view?usp=sharing maximum budget = 150$ Preference is given to someone who: -speaks Arabic so I can explain it clearly to him - And the lowest price
I SIMPLY NEED SOMEONE TO INTEGRATE THESE OPTIMIZATION ALGOS INTO MY EA. THE LIBRARY IS ATTACHED BELOW. NEED THIS DONE FAST. LET ME KNOW IF YOU HAVE OTHER QUESTIONS A list of implemented optimization algorithms: BGA (binary genetic algorithm) ANS (across neighbourhood search) CLA (code lock algorithm) P_O_ES ((P+O) evolution strategies) CTA (Comet Tail Algorithm) SDSm (stochastic diffusion search M) ESG (evolution of
Create a robot like this live on YouTube, it is a simple hedge system that does not have martingale or other risky means of.making money.... please check out the link and if it is possible for you to repeat this then reach out with a sample and price. YouTube: https://www.youtube.com/live/cT_42RWzq_0?si=Z8M5mKkAMGZhxdTL
Hi There I am looking for someone to create me a simple anti martingale EA The EA will open a buy and sell the moment the EA is attached to a chart. Should the price increase - additional buys will open. This will continue until profit point Should the price retrace all trades should close just before breakeven point. New sequence starts immediatly thereafter The sell trade will close if the combined profit of buys
Job Description: We are seeking an experienced EA programmer to create an EA that utilizes SnR + Trendlines + Multi timeframe confluence Project Requirements: - Support and Resistance, Open Close levels/kissing candles/Rejection block, Support broken becomes Resistance(SbR), Resistance broken becomes Support(RbS), Quasimodo Levels, Asian Range, London Killzone, London Open, New York Killzone, New York Open
Starting from scratch, I need a solution to develop my own crypto trading and exchange platform. This platform should compare prices across various exchanges like Coinbase, Binance, KuCoin, and Unocoin, as well as different cryptocurrencies. The solution must identify opportunities to buy on one platform and sell on another for a profit, transferring funds to my personal wallet instantly for security. The bot should
Need EA programmer to create an MT4 EA that will be able to leverage trades in favour of the market direction ,the EA should be able to operate to any broker. The EA must trade on a clear trend not when the Market is ranging. More will be explained once your application has been accepted for the job

项目信息

预算
40+ USD
开发人员
36 USD
截止日期
 1 天