Expert Advisors and Automated Trading - page 439

Hi, I need to write a function that returns 2 file handles, which are just ints, so I thought to declare the function like int[] getFileHandles(); but MT5 didn't support returning an anonymous sized array, and wouldn't let me return a pointer to it or even to specify the size like int*...
I have a doubt about how an stop loss order is implemented. Example: Imagine I have a Stop Loss sell order on EURUSD at 1.32045 (well below the current market). The market reaches 1.32045, the order fires, but without time to complete the full quantity, the market jumps to 1.32050, and stays there....
I have been coding for quite some time, but today I learned something new. For all of the experienced programmers out there, this maybe pretty obvious, but for anyone just learning, please read. When calling an indicator within an EA like this example, you assign a handle of type int:...
Hi, I got some troubles calculating the StopLevel - here is my code: double currPrice = SymbolInfoDouble(_Symbol,SYMBOL_ASK); double point = SymbolInfoDouble(_Symbol,SYMBOL_POINT); double stopLevel = SymbolInfoInteger(_Symbol,SYMBOL_TRADE_STOPS_LEVEL) * point; double stopPrice = currPrice +...
When I add AutoDayFibs (2).MQL4 Source file in indicator folder the meta trader software will be hang... I can use win7 sys. Pls give solution on this error...
  Automated Testing  (16   1 2)
Is it possible to call the tester for optimization from the EA? What I want to do is re-optimize every weekend after the market has closed. I can use MqlDateTime str1; TimeToStruct(TimeLocal(),str1);if (!selfoptimize) return;if (str1.day_of_week!=selfoptimizeday) return; to check for the...
Hi everyone, So I am in the process of creating an automated trading program and would really love to get your input. This is where I began trading and so I thought I would get the opinion of the mql5 community first. It is just a short 8 question survey to help me get started. I would really
Need know when a deal is done, if: (1) it created/scaled in, or (2) closed/scaled out, or (3) reversed position. As I understand it DEAL_ENTRY_IN would indicate if (1); DEAL_ENTRY_OUT would indicate if (2); and DEAL_ENTRY_INOUT if (3). However, no matter if I open a position, close, scale, or...
Hi all. Is it possible to detect automatically (script) the switch period between winter/summertime in America when i'm located in Europe? In the United States, Summer Time begins on the second Sunday inMarch and reverts to standard time on the first Sunday in November. In the European...
i have write the code like this : void OnTick() { // some codes... if(!PositionSelect(_Symbol)) { CTrade trade; trade.PositionOpen(_Symbol,ORDER_TYPE_BUY,0.1, SymbolInfoDouble(_Symbol,SYMBOL_ASK),...
Hello, on MQL4 it was very easy to get the value of Bollinger Bands double Upper = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,1); double Middle =iMA(NULL,0,20,0,MODE_SMA,PRICE_CLOSE,1); double Lower = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,1); hot is the same on MQL5...
I'd like to protect my Code both when showing it to someone and when sharing the strategy with someone. Is there any way to do this? Also, the metatrader language has to be a psuedo-language. Is there any way to see the underlying C# code? At least I think it must be C#. I've also been able to...
  My experience on building EA  (18   1 2)
Tried to building EA based on recommended usage of the most commons indicators such as ac, ad, adx, even combination of ma and par RESULT with the setting of equal pips to win and larger pips to accomodate the possibility that favours the movement(prevent early stop loss) with the recommended...
extern double MaxSpread = 3;int start()  { int SellOrder = 0; if(MarketInfo("GBPUSD",MODE_SPREAD) < MaxSpread)      { SellOrder = OrderSend ("GBPUSD",OP_SELL,1.0,MarketInfo("GBPUSD",MODE_BID),5,0,0,""...
Hello, Have a position for Symbol x and need to know the closes StopLevel that would be accepted by trade server. How to do this ? Thank you
I want my EA to close trade based on the change,lets say drop in bar of an indicator compared to the previous one. how can i set the condition? and if there is a manual can anyone link me? confused here
Hi Guys I was wondering if anyone knew how to have custom indicators remain on chart after backtesting?
Hi all Do you know how to download ticks/data for currency pairs and major indices for Alpari Pro? Thank you
Results are not always shown and the Journal message is that the pass was not significant. Please, please show me all the passes, good or bad, significant or not, because it helps me to learn.
In documentation, there is an example with import of stdlib.ex5 to use ErrorDescription like in MT4. But I can't find stdlib.ex5 or stdlib.mql5 anywhere. Do you know if it's stille exist or an alternative to ErrorDescription() ? Thanks
i have translate this good tool for coding string script for obsfucation. but i don t why i have this error in the log of editor at the compilation "implicit conversion from 'number' to 'string' CrypTool_Mt5.mq5" ? and the script converse good running ! #property script_show_inputsinput string...
Hi. Is it necessary to have VPS for a subscribed MQL4 signal? Also, is it best to use the broker that the signal author uses. Thanks, J
Hi, I created an EA for study perpous on the base of ADX, which take a long +DI > -DI and Short when -DI>+DI, but the EA which i created is not trading at all, need help from the programers or some one who familiar with this. i am posting my ea here Thanks in advance Suresh...
Dear All, I Edit an EA which works with BB and DEMA, I replaced DEMA as RSI, for some studyes perpous, but i get some error like, 'CopyBuffer' - no one of the overloads can be applied to the function call Bband.mq5 131 7 i am attaching the EA here,please advice me were i  went wrong, and guide me to...
Hi, I'm experiencing a bit of "documentation confusion" I hope someone can help me with. The documentation for all CopyXXX() functions contains the following note: "Note When requesting data from the indicator, if requested timeseries are not yet built or they need to be downloaded from the server,...
I am looking for real time signal to trade German Index FDAX. How I can search for that?
Hi, I m trying to open a second chart for my EA, but whan I call "ChartOpen(_symbol, _period);" in OnInit() function, the thing is that TWO charts are opened instead of only one. Any idea about why? Thanks in advance
Ive done some research on the topic. But the only 'recent' thing i could find was a script from 2011.11.29 13:46 https://www.mql5.com/en/code/712 But it gives me a lot of errors (very a lot) when i load it up to MetaEditor. So i thought maybe there is now a standard function implemented to load...
i have done backtesting ,and i want to do some real time testing ,but i have a demo account only. can i ? thanks.
Dear All, I have been with Meta trader last 2 years only, i feel realy comfert with MT5 than MT4, i have have gone throw most of the articles in MT5, then i decided to create my own trading module, here i have no problwm with my strategy bcoz i am certified TEC Analyst, and know some c++...