Expert Advisors and Automated Trading - page 102

To post a new topic, please log in or register
Hello.... I recently started experimenting with MQL5 and the following happens to me ... According to what I know ... it should be in 1, but it never leaves 2. OnInit()   ObjectCreate(StringToInteger(_Symbol),"1EstadoSuperiorLavel",OBJ_LABEL,0,0,0);   ObjectSetString(0,"1EstadoSuperiorLavel"...
Hey Guys,             I have a reasonably profitable EA that always generate large drawdowns during major news announcements but it doesn't have the capability to pause "autotrading". Does anybody know of a good EA that can pause Auto Trading during major news announcements and turn it back on...
Is there any EA that can close (or move the stop loss) to a level when all my open trades have reached a certain % profit for the day. Let's say I have $500 in my account and make some manual trades or EA's. I want them to secure all trades when they have reached more than 2% profit. So, if the...
Hello, i am using Dukascopy files exported with tickstory in MT5 with custom Symbol. Now when i want to start testing in Strategy Tester i get following error: 2018.04.10 22:56:53.525 Core 1  EURUSD_test: symbol to be synchronized2018.04.10 22:56:53.525 Core 1  EURUSD_test: symbol synchronized, 3464...
Is this normal that OnTick (and start) function in EA does not work on weekend ? OnTick (and start) works fine in Strategy tester but not in live mode. I expected it to work at least once even it is weekend. I am not sure if this is normal behaviour or particular to my own MetaTrader. I checked...
Hello friends, I am running an EA on one of my accounts on activtrades, and at least once a week I get a "4752 error" message, I searched and the error means "Trading by Expert Advisors prohibited" I contacted  activtrades and they did not inform me anything besides that the problem is not with them...
Hi can anyone share the code for the following problem Problem statement :  Need to place a SL on new high (when candle closes at new high ) the sell position must be close
I trade US Futures Contract S&P mini and Nasdaq mini with AMPFutures broker. In backtesting I have not been able to retrieve MarketBook data (Depth of Market), so I am trying to see if that can be reconstructed by getting data using CopyTicks, but I doubt it is same. I tried to total Volume from...
Hi, my EA moves stop levels. However, once the stop level is very close to POSITION_PRICE_OPEN, any further attempt to move the stop level results in ERROR 4756 Trade request sending failed. I assume the problem has something to do with either SYMBOL_TRADE_STOPS_LEVEL or SYMBOL_TRADE_FREEZE_LEVEL...
Hi, I'm working on an indicator which makes the same calculation process for each symbol of an internal list selected by the user (for exemple : EURUSD, USDJPY, etc...). The event which initiate a new calculation process for a given symbol shall be a new tick of this symbol. Important : This...
Good day to everyone. I have an indicator here that shows arrows in my chart. If the arrows pointin up then i will buy and if the arrows pointing down then i will sell. I try to attach it in my EA but when i try it on the tester, when the arrow appears and pointing up...it Opens a multiple buy...
Before I submit this to Help-desk can someone tell me if this is a legitimate a compiler bug? This only happens on MQL5, not on MQL4. #include <Strings\String.mqh>//+------------------------------------------------------------------+class String1 : public CString {public:   template<typename...
  CopyTicks question (12   1 2)
Hello all, I'm trying to get the TICK_FLAG_BUY and TICK_FLAG_SELL information from 'flags' in MqlTick struct provided by the CopyTicks fuction on a custom indicator but it seems I never get that information from this function. The Symbol I'm testing it has Times & Sales enabled and this information...
Hi I'm getting the following errors when declaring a multi dimensional array, And I don't now why, Just started coding with MQL5 Thank you
Hi, I am trying to overload the Assignment Operator as this demonstrates, but regardless of what I have tried, my overload in my class is completely ignored. Here is the Object class that I have defined... class Object{    public:        Object();        ~Object();        int value;        void...
Hi I have set a double array with the AS_SERIES flag using the ArraySetAsSeries function, but when I add a new value to array[0] the older values does not distribute to the other indexes, in fact it apears a loong number. See below the first 4 indexes [0] 3315.0 (this is right) [1] 9...
Dear all, please help me with an issue I faced in the very beginning of my code. Please, have a look at the image below. When I try to declare a global variable  (type bool) and compile the program, I receive a strange error: 'bool' - name expected I tried to search more info about that error in the...
Please find attached the GoldWarrior EA created by Tartan, Nemo and others for MT3, converted to MT4 by Star and improved and fixed the errors by Beluck. And be informed that this EA is working together with DayImpuls indicator attached. There are many versions of DayImpuls indicator. This EA is...
Hello, I have an EA which slow but steady turns buy/sell trades into losses. I want to switch buy orders into sell and sell into buy. there is that search function in the meta editor. if I know rewrite all 'buy' into 'sell' and the other way round, will that be enough?! -I have standard market...
Dear Metatraders,  I am trying to write a code in MQL5 that will allow me to calculate the current profit on all my open trades, In back-testing, the OrdersTotal() is giving me 0 knowing that I have multiple open trades,  Any idea what seems the problem ? Many Thanks
Hello, I created a Custom Symbol and imported BARS and TICKS. That's okay then. But when running a backtest I noticed that the High Ask and Low Bid lines were not correct and when checking the High Ask and Low Bid values ​​are always ZERO. But if I did the same with a Symbol other than...
  Ghost-functions? (11   1 2)
It sounds a bit sarcastic, maybe impossible to do as well, but if you can give any trick/workaround, please have a look!  (the red-colored lines gives you details of the areas in discussion). The goal is to : not to import functions, not to define functions in global scope, either....
I am trying to typify a template function with an object pointer like you can see below. But I always get "invalid pointer access". //+------------------------------------------------------------------+//| Class...
Hi, i'm learning so please have patience.... :-)  I'm using the Strategy Tester function to try and write a simple program to auto trade based on RSI breaches, as a training exercise. These are the settings i've applied, which I think should buy at 30 and sell at 70.  However when testing the...
When I include symbolInfo.mqh, it causes errors (attached).  Most of the errors says, "const modifier not allowed for nonmember functions".  So far, I have the below: #include <Trade\Trade.mqh>#include <Trade\SymbolInfo.mqh>#include <Trade\PositionInfo.mqh>#include <Trade\AccountInfo...
I have developed a 1 hour ea that works fine, however I am looking to add to positions if they are trade positive by x pips over the 5 minute time frame. I am having trouble trying to work out a simple way of configuring this: double PriceAdjust=(iHigh(NULL,PERIOD_M5,1)+iLow(NULL,PERIOD_M5...
For some reason I can't find a solution. I am trying to declare an optional MqlParam parameter In a method: void F(MqlParam &parm=NULL)    // here the = is not accepted because it's a reference parameter. I try to make the parameter optional { } but the compiler will not accept an assignment to a...
Hello, English isn't my native language, but I'll try to get by.. I'm a little bit new to mql4, but have been trying to get everything going, I was testing an idea, then I needed to test a progressive lot size, my EA opens one trade at a time, so I wanted to check if the previous closed trades hit...
I get the following warnings when I try to run a backtest on a simple EA. If you have any ideas about why I am getting these messages please let me know. Is there a resource that defines these error messages? Thank You
Hi, I wrote an ea and have run an optimization on Period 1 ( In Sample)   How can I test all the strategies on Period 2 (Out of Sample) at once, without having to do it manually for each of them. Is there a tool, software etc.. tha provides this feature ? Thank You,