Expert Advisors and Automated Trading - page 99

To post a new topic, please log in or register
I have an EA written in MQL5 the EA depends on data from four indicators, sometimes it copies the data correctly most times I get an error 4116, as a result of this error trades that depend on the value of the indicator are closed because of the ridiculous values that are posted to the indicator...
Hello Everyone,  I tried to modify Stochastic,  to pop-up alert  only one time once indicator reach to over-brought or Over-Sold Level. But again getting same error,  //+------------------------------------------------------------------+//|...
Hey! I need to dynamically fill objects of complex types (class or struct) with data. The class/struct may look like this: class FooClass{   public:      int Int;      string Str;      double Dbl;      .      .      .};struct FooStruct{   int Int;   string Str;   double Dbl;   .   .   .}; The catch...
Hello, when i place a file into folder files i can open this file when running or debug my expert. But when i run the backtest, the file is not found. Ok, after some research, i found the property tester_file. When i add this to my code: #property  tester_file...
Both of them returns the computer time, isn't it? What is the difference between them?
I'm running the same EA on three MT4 accounts. One relatively large account and a smaller account with the same broker. And another smaller account with another broker. Although I'm running the same EA and same timeframe on all of three accounts, they very often don't trade the same way. Often the...
Hi, I am trying to get the last deal type (Buy or Sell). I tried to find it in  https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_chart_mode as I am using SYMBOL_VOLUME to get the last deal volume, but i couldn't find anything similar to that. I also tried to...
Hi at All, i need to know if is possible to write a file (in the shared folder) when an EA (MT4) is running on MQL5.COM VPS services? Not a VPS with a MT4 terminal but a VPS buy from MT4 in MQL5.COM community! Thanks
I founded this tool for remaining bar, but I don´t know where I can download it; some help please
Hey all, is it possible to cancel a OnDeinit request ? Like i have EA1 and EA2, EA2 has dependencies on EA1. For some reason EA1 is turning into a "OnDeinit" state, now i want to check if he is allowed to exit. OnDeinit is a void function which will have no return check and this also means the...
Hello, I am trying to use the ZeroMQ library in order to send information on a TCP socket When I use my first line of ZMQ code in my Expert Advisor... ex: Context context("PROJECT"); ...and try to execute, I am asked by MT5 the following: I accept but nothing happens after that, I can the the same...
void OnStart(){Alert ("Total buy order is ",GetOrderCount(ORDER_TYPE_BUY));}int GetOrderCount(long type)   {    ulong order_ticket;    int total=0; //--- go through all pending orders    for(int i=0;i<PositionsTotal();i++)   {       if((order_ticket=OrderGetTicket(i))>0)         { //if(magic_number...
hi everyone . i was building an ea and now im testing it. but the ea stop working when i log out from trading platform(MT5).  is there any solution for this?  Thank you.
After the moving average crossed, Delay the third K-line alert。 e third K-line alert
Hi all, I'm looking for a carry trade Expert Advisor. Carry trade means buying a currency that pays high interest against a currency with low interest. We can earn $ if the currency that we buy is going up, only !  If you have any tips, thank you !  PS : maybe you can create such a robot ? 
Hi, I'm new in mql programming and trying to develop my first EA based on what I found in mql articles. The scope is learning because I've made backtests but I never got any profit :) For the code below I get next errors: 'CCI' - enumerator identifier already defined 'Stochastic' - enumerator...
Small question. I have this EA that has external input following as  focusing on the pipcount in the mt4 settings. extern double  PipCount    = 20; If I need the pipcount  not to  be able to be edited in the mt4 terminal setting I should use the following? int PipCount    = 30; or do I use the...
Hello i need to draw support and resistance levels for my EA, i have looked on alot of S/R indicators but none of them quite does what i need. I need a code that draws a line when the price is being rejected 2 seperate times in 2 diffrent candles(A support or an resistance area/line) nothing...
Hi guys, Would it be possible for someone to help me find a way to tell me EA to only execute trades when there is a specific distance between two moving averages? For example  double ma50=iMA(Symbol(),0,50,0,1,0,0); double ma200=iMA(Symbol(),0,200,0,1,0,0); I basically want to know which command i...
Hi traders and ea coder, kindly share ur views on my strategy , intraday, 1) daily every new high buy entry, 2) daily every new low sell entry, 3) timeframe 5 min and 1 hour 4) stop loss previous swing high for sell  stop loss previous swing low for buy or  5) stop loss current day high for sell...
Hi All, Is there any way to calculate dynamic take profit in dollar for martingale postilion. If I have .01 to .05  - TP  should be 2$ If i have range from .06 to.1 -- TP should be 5$ if the range from .2 to .9 -- TP should be 10$ like that it need to go I was thinking  like this  --...
Hi guys I recently had huge losses while my signal trader made profit. It turned out that my broker closed my positions 45 minutes before the trader..  Now i'm lost because i don't know who/what is the responsible and how to fix that !  Did you have such a situation yourself please ? Should i change...
can anyone know how to run single ea with different parameters to multiple charts at a same time on vps
I am trying to notify users that they have turned off their Auto Trading. Is there a way to send an alert and a Print message when the Auto Trading is turned off in an Expert Advisor?  If so, where would I place the code? Thanks!! Eddi Rae
Hello, how to detect stop or take profit ? It seems that transaction is not providing this information. This is a transaction protocol of a single in and out by stop loss: HK      0       16:28:32.544    Core 1  2018.04.03 09:00:00   market sell 0.60 Ger30 sl: 12015.81 tp: 11958.61 (11987.51 / 11987...
Hello,I have a simple question, did you know if it is possible to launch an order when anINCLINED support or resitance is affected?thanks for the answers .
This is a simple Expert Advisor for trading on EURUSD H1 market. Backtestet result: Trading rules: Long Entry - wait for a bullish bar with body > 30 pips and Volume > 2.0 * Average volume from last 80 bars. Open long at next bar Open and close at the bar Close. Short Entry -...
I have an EA that opens positions on multiple currencies with same magic number. I have another EA which closes a position according to certain rules, but the EA does not close the other positions on other currency pairs. Does anyone know of such an EA of when a certain magic number closes on the...
Hello Everyone, I am requesting guidance & assistance with basics steps to creating an array for a variable. My intent is to create a variable for a position's profit per candle, more specifically, I would like a position's profit for the last 3 candles. I will need to create an array right? & was...