Expert Advisors and Automated Trading - page 313

Hi, I have an indicator which shows the High and low of the first 2 candles of a week (4 hour chart). Need a simple EA which takes trade based on the break out of the high or low (closing basis). And in case if price goes against the initial Breakout, the EA must take an opposite trade with double
Hello I am a user of MT4 and just decided to use MT5 the problem is that in MT5, when trying to modify parameters in the input tab when I switch to an other tab and come back to the input tab all the parmaters are systematically reinitialized... How can we sort this out? Thank you very much for your
Im still learning alot regarding mt4 programming Basically saw the idea regarding correlation and bolligner bands Buy on the EUR/USD if price is below the middle line (20SMA) of the bands on the EUR/USD pair and price as crossed and closed below the lower band on the USDCHF pair Sell on the EUR/USD
Hi guys, I'm developinga Expert Advisor based, partially, on the volume of BUY and SELL deals for thelast minutes, to identify price trends. Unfortunately I'm not being able toperform back testing since CopyTicksRange()do not provide the flag field withvalue of TICK_FLAG_BID and/or TICK_FLAG_ASK. My...
Hello guys, I've a multi-currency EA that use the open of daily candle for some calclations. I've coded it as  SymbolSelect(oSy,true);Sleep(1000);RefreshRates();iOpen(oSy,PERIOD_D1,0) Most of times the value obtained from iOpen is right, but sometimes occurs that value is wrong and it is taken from...
[Deleted]
Hi all, I hope you are well. I have a question. I wonder how we can insert our EA into the mql5.com market if we use an extarnal indicator. I want to insert my EA in to the market however, I use an external indicator. Is this a problem?
Hello everyone, I am a beginner in coding and with the MT5 language. I'm trying to develop a slightly evolved EA. I already managed to perform basic functions but now I am stuck. My problems are: In the OnTick function () I check the position opening condition four times, at defined times...
I want to create an EA after making buylimit1 when buylimit1 success, it will execute buylimit2
Good day I need some help please. I am writing an EA and need to code the following: -Highest of 0 - 10 bars  > Highest of 10-20 bars - RSI of highest bar of 0 - 10   <   RSI of highest of 10 - 20 I have; int high10 = iHighest(NULL,0,MODE_OPEN, 10,0); int high20 = iHighest(NULL,0,MODE_OPEN, 20,0);...
this code works when I use [OHCL 1 minute] in the strategy tester, but when I use [every tick] it stops working and some positions remain open for ( int conta= PositionsTotal ()- 1 ; conta>= 0 ; conta--)        {         string symbol= PositionGetSymbol (conta);         ulong PositionTicket=(...
Hey everybody! I would like to share the following pain... I have a custom signal (inherited from CExpertSignal, based on Heiken Ashi candles) and EA based on this signal. The signal works fine, but it's not always displayed on the Strategy Tester chart... The problem is that it's displayed randomly...
Hello All, I could use some assistance with some code I have written. Basically I am trying to calculate consecutive days of rise or fall. The issue I am running into is the count isn't correct, it will start off at 0, now lets say its a bullish day it will increment by 1, the next day stays within...
Hello guys, can you tell me how I can pass the result of an indicator to an ea? HPFZ_statistica is the indicator, I have to pass the value of the PronosticoFinale[MaxValue], in the expert advisor HPFZ_1. p.s. At line 161 HPFZ_Statistica indicator is the value to be passed in the EA.
if((iMA(NULL,0,89,0,MODE_EMA,PRICE_OPEN,0)>Bid))     {         result1=OrderSend( Symbol(),OP_BUY,Lots,Ask,Slippage,                    //--------------Order 1                           SL1,                           TP1,                           Comment,MagicNumber,0...
I have found that there is an issue with HistoryDealsTotal() while using the optimization algorithms of the tester. During a normal backtest everything's fine, but in an optimization session, during the initialization phase of the EA, HistoryDealsTotal() returns the number of deals from the...
HI All I have a problem and I have some questions. I trade in my country stock market and I have an EA that send order but the orders that sent by the EA not accepted in market trading core. that was my problem. and my questions are: how they understand the orders sent by an EA? what is difference...
Hi There, right now I am backtesting and optimizing an EA, that I work on for some time... The problem now is: The Profit Factor of some optimized trades is not being shown. Does someone know why?! [second column is pf] I have a quite high pf at some trades, 27 aso. Might there be a maximum pf the...
Hello, the following Code simply opens a sell order: #include <trade/trade.mqh>CTrade         m_trade;                         // The Trade Class ObjectMqlTick        last_tick;                       // Get bid and ask price for current tick   bool           trade = true;int OnInit() {...
Hello boys, Im trying to make a new robot but when I compile and debug it the input parameters reset to 0 and I cant test it... anyone know whats happening?? Thank you so much
I developed a EA that only work for GBPJPY M5 and special broker , if it is possible to sell it at MQL5 Market ?  Now it can't pass the validation , errors as : test on EURUSD,H1 there are no trading operationstest on NZDUSD,H1there are no trading operations test on GBPUSDcheck,M30 there are no...
Hi everyone,  I'm creating this post in order to fix my unsolvable problem.  In my opinion, my script is good ( no warning and no error message ) but when i want to do some backtest, nothing is happening.  For information and to help the comprehension of this script, I just want 1 trade by 1.  In...
Good day, I'm back-testing a grid system, and am desperately trying to confirm if the relative drawdown or absolute drawdown takes a grid system into account? For example, my backtest statement shows the Relative DrawDown on a backtest of 1 year to be $6k (give or take). However, nowhere in the...
I did run this script to check: if (! AccountInfoInteger ( ACCOUNT_TRADE_EXPERT )) Alert ("Automated trading is forbidden for the account ", AccountInfoInteger ( ACCOUNT_LOGIN ), " at the trade server side"); and got no error message. When the EA detects an Open position, (in demo) it
Hello, I am trying to set initial stop at 3 times current ATR. I want to get current ATR with: input double ATRHandle = iATR ( _Symbol , PERIOD_CURRENT , 14 ); and use it like this: input double Signal_StopLevel = 3 *ATRHandle; But I get "constant
I'm trying to build my first EA and honestly i'm mostly using copy and paste but i cannot see why this is not working the way i want it to. The idea is to move my stop loss up to the Low or High of the candle with a shift of 2 but once its placed it should not move back. In this example i have a Buy...
I am using MQL4 4.00 build1170 (20/dec/2018). When I am using "strict" mode (#property strict) in a EA to generate an ex4 file, I found this ex4 file has some problem: The name of the external variables will not be shown; instead, it is showing the comments following that external variable. For
Hello, I have an Expert Advisor which is using different external Indicators. Now I have seen that it's just possible to sell an EA in the MQL Market as one ex4 file. So it's not possible to attach external Indicators. What i the easiest way to implement the external Indicators in to the EA ex4...
Hi,  Is there any convertor or other "simple" way to convert an MT4 EA to MT5 EA? I got the ex4 and mq4 file.. I couldn`t find any proper info on the internet, so I guess, its not very easy.. Thanks..
Hello guys, I start by admiting I am a noob in coding, I only recently begun to understand some basics and I try to build my own EA for testings, gathering parts of code from all the library from many EAs out there However I am stuck at this thing that I can't find anywhere any code: I want to...