Expert Advisors and Automated Trading - page 339

int TrailingStop=20;   if(TrailingStop>0)     {      for(int x=0;x<OrdersTotal();x++){    if(OrderSelect(x,SELECT_BY_POS)==True)               if(Ask-OrderOpenPrice()>Point*TrailingStop)        {         if(OrderStopLoss()<Ask-Point*TrailingStop)           {            bool...
Hi guys I've developed a strategy using C++ in Borland C++ environment and I wanted to rewrite it in MQL4 but then I figured why not calling MQL4 functions right from C++ instead ! You know, functions like OrderSend() , OrderModify() and things like that.  That would actually save me a lot of time...
  Imaonarray  (1)
Hello I would like to know how to use imaonarray, I cannot understand the first variable in the bracket, the array part who do I do that
We are not official MQL developers at the MQL Freelance marketplace, but we help to answer and help anyone who seek help on all the MQL Forums. The time we spend Giving Back as support or other ways is a way to thank you guys for the wonderful platform you developed over the years. MT5 community is...
Good morning to all. I need to collect the history tick data from my broker. Is there a bot here in the market doing that? Or need to order a new one? Thank to all in advance for suggestions.
Hello everyone I'm looking for a simple EA that makes buying / selling from the opening price of the day, with fixed price for all day Maybe this already exists, but I can not find I am really very bad with MQL codes ......
Hello! I want to identify both last BUY and SELL order ticket to calculate their current profit and add more positions after X profit. I have tried several ways but I don't know why it's not working. I have tried printing the ticket variable out but the ticket number is always 0 Here is what I have...
Hello Im using the Webrequest-method to communicate with my controll server. Somehow this does not work anymore. It seems that Metatrader is stuck in a endless loop (and eventually crashes), starting at call Webrequest();. I've allready tried to inspect the situation using brackpoints, other...
i have tested several brokers and they all fail. maximum 2 months of M1 price history there. i have seen lots of programmers here in mql5.com that can test their systems in 10 years or even 15  years. this problem is remaining in mt5 too. does someone have any solution.
Hello,  Does anybody has the solution or experiences for my problems, i wonder that the VPS from metatrader has problem so that my ea can't execute deal at 00:00:00 GMT+3.  at 00:32:00 the terminal log is auto send the terminal log as picture attached shown. Thanks
  EA turned on by script  (15   1 2)
Hello. Is it possible to activate EA through script? Basic idea is: EA is active (or just present on chart) with the spread below some value only. If it's higher then script turns off EA and bring it back when spread falls to desired level. Any examples of such solution? Regards
  Trailing Stop  (2)
Hello, i have a question how to use the Trailing Stop i found inside the inlude following files now i try to use a trailing stop with fixed pips. the function already exist i used the include  #include <Expert\Trailing\TrailingFixedPips.mqh>#include <Expert\Expert.mqh> and now, how i can use the...
Hello, I am testing my EA strategy on two different computers simultaneously, one of them is MacBook Pro (I run Windows on it), the second one is a very powerful workstation. When I run exactly the same test on both, the charts are different. What happens is, the workstation opens bars exactly at 00...
Hi, I am in the process of developing a strategy and just have a question about Orders. My idea is to have multiple take profit targets depending on the trend and then reduce the trade size. Thus is it better to open multiple orders or is it more advisable to update existing order? This would be a...
Hi l rented two apps when l tried to download apps only one notification  at the top comes up not (is Meta Trader opened ). downloading demo version ok trying to download app can help team help
Hi, everyone!   Is it possible to call (create, raise) pre-create dialog by MQL API? (without external DLL click emulation)   I mean this:
Hi, I am trying to generate a trading strategy based on RSIs across different timeframes, however, there seems to be some issues when I backtest it. The EA doesn't seem to interact properly with the RSIs from different timeframes. For example, when I select "H1" and "M30" in "Period" in Strategy...
I am trying to optimize the period of an indicator using the optimizer in the MT4 strategy tester. The indicator will have varying initialization periods for each optimization run. Is it possible to configure the strategy tester such that trades can only open after the longest initialization period...
Hi all I am developing an EA in MQL5. I am having issue in removing TakeProfit of open position. I am using following method. CTrade trade; trade.PositionModify(symbol, 0.0 , 0.0 ); I am getting [ invalid stop ] error. Please help
Hello guys, My EA creates graphic images from some data values and operations and save them as BMP. But, as it create a lot of images, each one with around 1MB, this is consuming a lot of disk space. So, there are a way to convert these images in JPEG format? Or at least, save them directly in JPEG...
double ordertotalb_0() //countung buy orders{ double totalb=0; int i; for(i=OrdersTotal()-1; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) {...
I created some .mqh files and left them in the Include folder (not a subfolder of the Include folder). I tried calling a class from the .mqh in my Expect Advisor but I keep getting a "undeclared identifier" error. Where should I place my .mqh files to be recognised by my Expert Advisor?
Hi all ! Searching a good Trailing stop for an Scalping EA, i found somes here, but i would like to know if one of us found a good one, that works fine ! if u have link, and if it's simple for configuration, will be great too ;) my goal is to have fast SL moves when doing profits (SL move each...
Hello Everyone,
Hi all, I use MT4 for automated trading since a time. Very often I heard that the MT5 is better. Has someone experience by MT5
Hi All,  Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once.  It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair...
I tried to use generic pointers to access the subclasses methods but I was unable to access the correct methods.  Can you help me to do it right? I expected the direct and indirect access with the same output. class Super {public:   void action(){ Print("Super");}};class A : public Super {public:...
[Deleted]
Hello. i've got some problems. The Expert advisors are running 6 months without problem in real account. I have 10 experts advisors running the same parameter,on the same broker,same MT5 Version,Same timeframe 3 of them gave me the following error : One of them gave me this error : (USDJPY,M2) array...
Below are some logs from an indicator in the .log file: "2 01:02:27.235 Custom indicator #VISUAL ORDERS GBPJPY,M5: removed 2 01:02:27.237 Custom indicator CCI GBPJPY,M5: removed 1 01:05:09.372 Mail: invalid SMTP settings (Tools->Options->Email) 02:20:00.873 TopIndicator USDCAD,M5:...
Hallo, Can anyone give and example for closing all positions using OrderSendAsync() with TRADE_TRANSACTION_ORDER_DELETE ? Thank you for any help