Expert Advisors and Automated Trading - page 124

To post a new topic, please log in or register
input int volume, rsiP, bandP;input double sl, bandD;input ENUM_TIMEFRAMES tf;input ENUM_APPLIED_PRICE bandAP;bool ok = false, closing = false;//+---------------------START TIME CLASS-----------------------+datetime cStartTime(int pstartHour= 0, int pstartMinute= 0){MqlDateTime...
I am able to get to ADX main value ie double ADXDefinition[] int ADXDefinition= iADX(_Symbol, _Period, 14); works perfectly.. But cannot seam to find the syntax to access the Di+ and Di- values have tried this double DiPDefinition[] int DiPDefinition = iADX(_Symbol,_Period,14,PRICE_CLOSE...
Hello all; I switched to MT5 a few days ago - so apologies in advance for my ignorance. My focus  is on multi-pairs (hence the switch to MT5). However I am struggling to get things to work the way I would expect them (probably my lack of understanding about MT5). I am trying to check that a new bar...
Hello guys i am new in metatrader and want to learn some codes the same as OnTick{ } or OnBar { } is there a method that is called each time a position closes in metatrader for example OnPositionClosed { }
Hello, I have the following situation: 1. Have an EA which loads DLLs 2. The DLL needs more extra DLLs 3. I have copied the EA Dll to the lib folder and the extra DLLs to the Meta Trader 4 Installation directory (I don't know another solution, otherwise it is not possible to load this dll) 4....
I have issued a brief for the development of an EA. I am keen to have a solution developed by two separate programmers, and to pay them both. But normally when I select a programmer from the list, it automatically excludes all of the others. How can I allocate the same job to two different people at...
Hi. For some unknown reasons that I have no idea about them, auto trading has been disabled from server. the server that I work with, locate in Iran. I would like to know is there any solution or trick to me for trade automatic with mql5? Regard
Hello, I have an indicator used in my EA with the function iCustom. Actually I use two of them, with two different setting. In the debug mode, when Strategy Tester Visualization window appears, I see two lines showing the indicator with two setting. The problem is that they have the same color. I...
E.A freezes when i try to backtest it on higher timeframes (1D works), any clues? (attached EA). 
Hey guys, I am looking for an EA that will allow my stop losses and limit orders to be invisible to my broker. Can anyone point me in the right direction as to one that already exist or to a programmer? I am not looking for strategy included, just those two options right there. Thanks
  Buttons MQL5 (3)
Hello, i trade since long time with ipad and VPS server, in this case i had generated few button but the dont work as i wont. When i press the button, it always looks pressed till the next time.   attached you find the code, maybe someone have an idea how the problem ist
Hi, Writing a pretty simple EA and everything seemed to work. Now running it on a different broker it keeps giving the 131 error. I tried getting the min lots, max lots, lot step with Marketinfo, it returns that minlot is 0.01, but for bot maxlot and lotstep it returns 0. What does that mean?...
In this EA found in the articles of the site, it is not working correctly for me, there is no batch that I put that would make it work, back this error message, I am trying to make this EA work with a lot of 1.0, but there is no way for this . Someone can help.
Hi guys,  I need help in correcting an EA... The full code is referred in the postion instead of order, but couldn't find the right term (i.e. what's the parallel name for POSITION_VOLUME - which is not ORDER_VOLUME) input double Multiplier = 2;input string SignalName = "Luobo Froex";input int...
Hello i would like to ask in generally, what kind of optimisation of you preffer - Long term you optimize your EA (only parameters not logic) with range from several years and hope that in the next year or months it's doing good, or you optimize for the last year and optimise each month to adapt...
Hello Can everybody help me to find buffer and mode of this indicator https://www.mql5.com/en/forum/178253? (buffer and mode of every color for each timeframe and all MACD & STR & EMA ?for use in EA) Thanks
Hi, In my EA testing, I want to write all Buy and sell events in a file. Here is what I did, But it is writing only one line instead of two or more. FileWrite() inside OnTick() funstion is not being executed. Any suggestion? Thanks. int handle = FileOpen("OrdersReport.csv", FILE_WRITE|FILE_CSV,...
I have a little challenge. When I for example use OctaFX or MT5 from this website does my code works. But in IC Market does this code not work. trade.PositionClose Type of account is hedging. The code error is 4756 Also if I open an order with  #include<Trade\Trade.mqh> trade.Buy(0.1) I can not use...
Comments that do not relate to the "Mouse coordinates and CHARTEVENT_OBJECT_CLICK", have been moved into this topic.
How can I get mouse coordinates under an object when I click on it? Is it possible for MT5 to generate 2 events when I click on an object? I mean, CHARTEVENT_OBJECT_CLICK and CHARTEVENT_CLICK also? I tried almost every idea I had, but now I'm stuck. I cannot get mouse coordinates when I click on...
Hello, if I do: string a = EnumToString(MODE_SMMA); I get: a = "MODE_SMMA" Now, I would like some function that does just the opposite, I mean something like: int b = StringToEnum("MODE_SMMA"); b = 2 where 2 is the int value associated to the constant: "MODE_SMMA" Regards, cyberglassed.
  StringToEnum (23   1 2 3)
Hi everybody, It's possible to convert an enum to string though EnumToString. What about the reverse operation? There's an way to convert it back (other than create and function and compare item by item)?
Is there a watchlist program where I can set it to load my EAs by clicking on a symbol?  Something to simplify the loading of EAs on multiple charts. Just click on symbol and chart automatically loads with EA
Hi I coded a simple EA for my first try, but it does not work when it was tested. I got the problem about "unsupported filling type" last time and I added some new code to solve this, but this time it still does not work by sending the error code: 4753. I am really confused becoz I dont know where...
Hello, is it normal to get no margin information ? 0=SymbolInfoDouble(symbol,SYMBOL_MARGIN_MAINTENANCE);0=SymbolInfoDouble(symbol,SYMBOL_MARGIN_INITIAL);CSymbolInfo si;si.Name(symbol);0=si.MarginLong();0=si.MarginShort(); All zero. I am happy.
I'm performing some testes with my EA, and I realized that when I'm in the strategy tester (simulator) the tick value and tick size are different from a real situation. For instance, I'm printing these values: m_symbol.Name() m_symbol.TickValue() m_symbol.TickSize() And the results are: Simulator =>...
Hello, Im trying to understand trade function in the Ctrade class. I don't get what is the difference between the Buy function and the positionOpen function. I mean a Buy is to open a long position,  so for what is positionOpen? Thank you.
Weird behavior here. CiLow.GetData( 0, Bars( _Symbol, _Period, initialTime, TimeCurrent() ), buffer ); The previous call, when run in back tests, returns a buffer with n elements, where the first of these elements is the low of bar at initialTime. However, the same call in a demo live account...
How do you set a range? To be used as a condition. Specifically a datetime variable that has a a time range.
Is it possible for an EA/script to save ALL chart templates that are open in the terminal? I know the chart operations are available but how do I search for the values of the chart ID's that are open? If I can pull a list of the open chart ID's can I use ChartSaveTemplate to reference each...