MQL AI Wizard Community Codebase Library

In this overview, you can view statements addressed by community users as a prompt to the MQL-AI wizard as well as its output.

.

# AI instruction / parameter set Snippet Date
1 please update code. correct error for line 36:Syntax error at input '?' 12th June 2024
2 write a pine script code that plot the difference between the stock price and the leanding span b of the ichimoku cloud. show this on a panel separate from the main chart. Also show a MACD of this plot on the same panel. 12th June 2024
3 write EA for dochian chanelling 11th June 2024
4 generate a fully functional MQL5 EA having all the functions specified below - 1. EA will activate everytime the key "k" is pressed2. EA will place one sell market order of lotsize1 and two buystop orders of lotsize1 and 2 respectivally.3. buystop orders will be "pipsdifference" pips away from sell order at same price..4. stoploss of sell orders will be buystop price and stoploss of sell order will be sell order price.5. EA will place two sell stop orders of lotsize1 and 2 respectivally having same price and stoploss as initisl sell order when buystop order "!" gets executed.6. lets name buystop orders of lotsize1 as "1",lotsize2 as "2", sell stop order of lotsize1 as "3"and lotsize2 as "4".7. EA will create a loop butween buystop and sell stop order. 3 and 4 will get placed on the execution of 1 and 1 and 2 will got placed on execution of 3 again and again.8. EA will place an imaginary line for lotsize2 "imaginarypips" above for buystop order and "imaginarypips" below sell stop order, which when hit will modify stoploss of all current running and pnding positions with lotsize2 paramete to 2 pips below and above imaginary lines for buy and sell orders respectivally. it won't have any effect on position with lotsize1 parameter.'9. lotsize2 = x * sum of all previously executed positions of lotsize1 and 2 both. when any imaginary line gets hit, lotsize2 will reset to 0 and restart the count again from next loop. 11th June 2024
5 write a MT5 indicator for stochastic oscillator, to be displayed on indicator window, and to send alert whenever buy and sell signals appear 11th June 2024
6 'GoldCafe.mq5'GoldCafe.mq511'Trade.mqh'Trade.mqh11'Object.mqh'Object.mqh11'StdLibErr.mqh'StdLibErr.mqh11'OrderInfo.mqh'OrderInfo.mqh11'HistoryOrderInfo.mqh'HistoryOrderInfo.mqh11'PositionInfo.mqh'PositionInfo.mqh11'DealInfo.mqh'DealInfo.mqh11'MODE_MAIN' - undeclared identifierGoldCafe.mq553133'iStochastic' - wrong parameters countGoldCafe.mq55328 built-in: int iStochastic(const string,ENUM_TIMEFRAMES,int,int,int,ENUM_MA_METHOD,ENUM_STO_PRICE)GoldCafe.mq55328'MODE_SIGNAL' - undeclared identifierGoldCafe.mq554135'iStochastic' - wrong parameters countGoldCafe.mq55430 built-in: int iStochastic(const string,ENUM_TIMEFRAMES,int,int,int,ENUM_MA_METHOD,ENUM_STO_PRICE)GoldCafe.mq55430'iRSI' - wrong parameters countGoldCafe.mq55522 built-in: int iRSI(const string,ENUM_TIMEFRAMES,int,int)GoldCafe.mq55522'PositionSelectByIndex' - undeclared identifierGoldCafe.mq513111'i' - some operator expectedGoldCafe.mq513133 11th June 2024
7 place pending order at high and low of previous candle when 1 trade executed place a reverse hedge mid way between the previous candle high and low maximum 2 open positions 11th June 2024
8 // generate a fully functional EA in MQL5 having all the functions specified below - // 1. EA will activate everytime the key "k" is pressed// 2. EA will place one sell market order of lotsize1 and two buystop orders of lotsize1 and 2 respectivally.// 3. buystop orders will be "pipsdifference" pips away from sell order at same price..// 4. stoploss of sell orders will be buystop price and stoploss of sell order will be sell order price.// 5. EA will place two sell stop orders of lotsize1 and 2 respectivally having same price and stoploss as initisl sell order when buystop order "!" gets executed.// 6. lets name buystop orders of lotsize1 as "1",lotsize2 as "2" and sell stop orders of lotsize1 as "3", lotsize2 as "4".// 7. EA will create a loop butween buystop and sell stop order. 3 and 4 will get placed on the execution of 1 and 1 and 2 will got placed on execution of three again and again.// 8. EA will place an imaginary line for lotsize2 "imaginarypips" above for buystop order and "imaginarypips" below sell stop order, which when hit will modify stoploss of positions with lotsize2 paramete to 2 pips below and above imaginary lines for buy and sell orders respectivally. it won't have any effect on position with lotsize1 parameter.'// 9. lotsize2 = x * sum of all previously executed positions of lotsize1 and 2 both. which will reset to 0 and restart the count again from next loop and also delete the pending orders haing lotsize2 parameter, only if any imaginary line gets hit. 10th June 2024
9 i need a similar so magic 10th June 2024
10 // ------------------------------------------------------------------ //| Alligator_RSI_EA.mq5 |//| Copyright 2022, MetaQuotes Software Corp. |//| http://www.metaquotes.net/ |// ------------------------------------------------------------------ 10th June 2024
11 ciao, potresti generarmi un codice mql5 utilizzando l'indicatore alligator e rsi 10th June 2024
12 I want an indicator that is supposed to show entry points based on Al Brooks' "High 2 bull flags and Low 2 bear flags" strategy as briefly stated in this page: (https://www.brookstradingcourse.com/price-action/10-best-price-action-trading-patterns/). This indicator must show the break outs from the second flags that are formed in a trend. 10th June 2024
13 Create a codewhere create Long and Shor orders, where the SL is at 2 pips with the opening of the trade the lots will be at 1% of the capital 10th June 2024
14 Id_0488 = 0; Ii_0490 = 0; Id_0498 = 0; Ii_04A0 = 0; Id_04A8 = 0; Ii_04B0 = 0; Id_04B8 = 0; Id_04C0 = 0; Ii_04C8 = 0; Id_04D0 = 0; Id_04D8 = 0; Ii_04E0 = 0; Id_04E8 = 0; Ii_04F0 = 0; Id_04F8 = 0; Ii_0500 = 0; Id_0508 = 0; Id_0510 = 0; Ii_0518 = 0; Id_0520 = 0; Id_0528 = 0; Ii_0530 = 0; Id_0538 = 0; Ii_0540 = 0; Id_0548 = 0; Ii_0550 = 0; Id_0558 = 0; Id_0560 = 0; Ii_0568 = 0; Id_0570 = 0; Id_0578 = 0; Ii_0580 = 0; Id_0588 = 0; Id_0590 = 0; Ii_0598 = 0; Id_05A0 = 0; Ii_05A8 = 0; Ii_05AC = 0; Id_05B0 = 0; Ii_05B8 = 0; Id_05C0 = 0; Ii_05C8 = 0; Id_05D0 = 0; Ii_05D8 = 0; Ii_05DC = 0; Id_05E0 = 0; Ii_05E8 = 0; Id_05F0 = 0; Ii_05F8 = 0; Id_0600 = 0; Ii_0608 = 0; Id_0610 = 0; Ii_0618 = 0; Id_0620 = 0; Ii_0628 = 0; Ii_062C = 0; Id_0630 = 0; Ii_0638 = 0; Ii_063C = 0; Id_0640 = 0; Ii_0648 = 0; Id_0650 = 0; Ii_0658 = 0; Id_0660 = 0; Ii_0668 = 0; Ii_066C = 0; Id_0670 = 0; Ii_0678 = 0; Id_0680 = 0; Ii_0688 = 0; Id_0690 = 0; Ii_0698 = 0; Ii_069C = 0; Id_06A0 = 0; Ii_06A8 = 0; Id_06B0 = 0; Ii_06B8 = 0; Id_06C0 = 0; Ii_06C8 = 0; Id_06D0 = 0; Ii_06D8 = 0; Id_06E0 = 0; Ii_06E8 = 0; Ii_06EC = 0; Id_06F0 = 0; Ii_06F8 = 0; Ii_06FC = 0; Id_0700 = 0; Ii_0708 = 0; if (Bars < 30) { if (Ib_070C) { Print("NOT ENOUGH DATA: Less Bars than 30"); } Li_FB4C = 0; Li_FFFC = 0; return Li_FFFC; } Ls_FFF0 = TimeToString(Time[0], 1); Ii_0108 = _Period; if (Ii_0108 == 240 || _Period == 60) { Ls_FFE0 = (string)TimeHour(Time[0]); Ls_FFE0 = Ls_FFF0 Ls_FFE0; Ls_FFF0 = Ls_FFE0; } if (Ii_0108 == 5 || Ii_0108 == 1) { Ls_FFE0 = Ls_FFF0 " "; Ls_FFE0 = Ls_FFE0 TimeToString(Time[0], 2); Ls_FFF0 = Ls_FFE0; } Ls_FB40 = Ls_FFF0; if (Ls_FFF0 == Is_0748) { Ib_07 10th June 2024
15 The best strategy for fast scalp forex 9th June 2024
16 regenearte entire code considering this error message on line 27:Syntax error at input 'end of line without line continuation' 9th June 2024
17 1. **Position Sizing**: Each position you open will involve 30% of the remaining balance in your wallet at the moment 2. **Signal for Selling**: When the Moving Average Convergence Divergence (MACD) chart crosses the Signal line from up to downward, open a sell position. 3. **Signal for Buying**: When the MACD chart crosses the Signal line from down to upward, open a buy position. 4. **Take Profit**: Set the Take Profit level at 1% of the market price. 5. **Stop Loss**: Set the Stop Loss level at 1.5% of the market price. 6. **Closing Positions Early**: If the MACD and Signal lines cross again before the Take Profit or Stop Loss levels are reached, close the position and open a new one based on the latest signal. 7. **Limit on Open Positions**: Never have more than one position open at a time. 9th June 2024
18 if the 5 min candle is under moving average and dropped 500 pips at any of 5 min candle just sell when candle is close and stop loss is high of that candle 9th June 2024
19 Volume = 0.01In account historyThe last transaction closed, whose year, month, day, hour, minute, second, was greater than the rest of the transactionsAnd if the trade was a buy and its profit was greater than or equal to 0.01, take a buy at the price of AskAnd if the transaction was buy and its profit was less than or equal to -0.01, take one cell at the bid priceAnd if the transaction was a cell and its profit was greater than or equal to 0.01, buy a cell at the price of willowAnd if the trade was sell and its profit was less than or equal to -0.01, take a buy at the price of Ask 9th June 2024
20 // Expert initialization functionint OnInit(){ return INIT_SUCCEEDED;}// Expert de-initialization functionvoid OnDeinit(const int reason){}// Expert tick functionvoid OnTick(){ // Define parameters double lotSize = 1.; int distance = 100; // in points double profitTarget = 80 * Point; // Take Profit level in points // Check if there are no open orders if (OrdersTotal() == ) { // Get the current price double currentPrice = Ask; // Sell double sellingPrice= currentPrice *distance currentPrice; // Buy order int buyTicket = OrderSend(Symbol(), OP_BUY, lotSize, Ask, 3, , profitTarget Ask, "Buy Order", , , Blue); double buyingPrice= currentPrice -currentPrice*distance; // Error handling if (buyTicket < ) { Print("Error in Buy OrderSend: ", GetLastError()); return; } // Sell order int sellTicket = OrderSend(Symbol(), OP_SELL, lotSize, Bid, 3, , Bid - profitTarget, "Sell Order", , , Red); // Error handling if (sellTicket < ) { Print("Error in Sell OrderSend: ", GetLastError()); return; } } // Loop through open orders for (int i = OrdersTotal() - 1; i >= ; i--) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { // Only handle buy and sell orders if (OrderType() == OP_BUY || OrderType() == OP_SELL) { // Check for profits if (OrderProfit() >= (profitTarget * lotSize)) { // Close the order CloseOrder(OrderTicket()); } } } }}// Function to close an order by its ticketvoid CloseOrder(int ticket){ if (OrderSelect(ticket, SELECT_BY_TICKET)) { if (OrderType() == OP_BUY) { OrderClose(ticket, OrderLots(), Bid, 3, Violet); 9th June 2024

This module is another development of the ayondo Lab. The application has an experimental character. It is a version in an early beta variant. New versions will be rolled out shortly. We explicitly refer to the further notes on the use of artificial intelligence. In addition, we would like to draw your attention to the disclaimer, which you should note before using it. Should you use the tool, you do so at your own risk.


The module is provided for free and independent use, subject to the above disclaimer. It primarily serves demonstration purposes. On the one hand, to show what AI-enriched process flows are already capable of today. On the other hand, the community is to be motivated to extensively test the actual performance, in particular, to identify weak points and susceptibility to errors.

We put our developments at the service of the global trading community. Due to the rapid growth of this technology field, we assume that it is not immune to misappropriation. We try to live up to our responsibility and only use technology when we believe it is associated with added value for the user. Because AI is uncharted territory, we follow all developments very closely. Whether you use our tools or those of other providers, we recommend that you look into the providers' motivation of the respective services before using AI-supported processes. Under no circumstances adopt AI output be without quality assurance. This also applies to the tools we provide.

For program codes, such as so-called Expert Advisors, which supposedly rely on AI-driven processes, we can confirm through the experience of diverse test series that these cannot be classified in the Holy Grail category. Before purchasing a program code ("EA"), test it thoroughly. Be fundamentally cautious about over-optimized performance claims!

If you are interested in further developing this and other applications, please feel free to send us your suggestions and ideas. Should you generate program code via the MQL AI Wizard, feel free to share the results generated via it with us or the social trading community. Via the provided support forum (registration required) you can exchange ideas with like-minded people and share your experiences.

* * *

For a first no-obligation test output click here.

* * *