Expert Advisors and Automated Trading - page 359

  Sell Stop level  (3)
Hi, I would like to place a sell stop as on picture below: I have this loop below to find last up and last down ZigZag indicator but I don't want to place a pending order on the first up or down ZigZag, what is wrong into my loop? int limit2=1; for(int p=1;p<=limit2;p++)   {...
Some of these bots are just pure magic in the demos even at just 1:50 margins. I don't believe it. Please explain what's going on here.
I want to set condition when moving average crossed UP. enter Buy with 20 point above current price. and it should not enter if current price is more than 100 Point above Crossed Price. for example: for Gold FastMa crossed SlowMA at $1250. Entre buy at 1250.20 but does not enter if the price was
I got the code from ICoff at forexfactory i wanted to take out the stop loss settings in it and have it just close op on opposite candle It will open buy orders but not sell orders on sell orders i get error 130 Invalid stops...
hi guys, I lost my EA code, is there any way to recover it ? I just have blank page !! the result is left for me only. :( Bars in test5023Ticks modelled9946Modelling qualityn/aMismatched charts errors0Initial deposit10000.00Spread20Total net profit-605.89Gross profit4559.98Gross loss-5165...
Hi, I am considering offering a signal but how can there be protection for the signal going to one account and not being copied to another account. Also with the signal what information can also be sent?  I am thinking about messages or alerts, comments, etc?
hello everyone... I'm newbie and need help on probably very simple logic... how do you describe bullish and bearish candle in mql4 language? UpBarr = bullish candle; DwBarr = bearish candle; Thank you..
Hey folks, I have my EA running on a VPS and it's using max CPU. I deleted everything. Then I added back my indicators one at a time, monitoring the CPU. It was fine until I adde the EA. For each currenty pair I added, it took up about 12-15% CPU.  Is this common for EA's? I've read that an "open...
Hi all, given 5 closed orders in HISTRORY. means OrdersHistoryTotal(); returns 5. Now Order select by index and SELECT_BY_POS,MODE_HISTORY MODE_HISTORY seems to depend on Terminal TAB settings of History, e.g. time period, but also others?? Question: How does index in Order_Select now adress these
[Deleted]
I got this code from the mql4 programming book. Can someone please explain to me why there is an addition of one in this line of the code 'One_Farm=One_Farm*(1+Perc_day/100)' and a subtraction of 1 in this one 'One_Farm=One_Farm*(1-Perc_exit/100);' int start() //...
Hi Guys I'm having a bit of a problem with testing my EAs. I can run tests on the four advisor's that  come with MT5, but when I use the wizard to make my own or use a downloaded EA, from MQL5 codebase, the strategy tester wont place any trades. Has anyone else had this problem. What should I...
Disclaimer: I am NOT A CODER! I have a trading system and an EA that I've had developed for distribution with a password/account number compilation. BUT....I want to add this EA to the MQL5 marketplace. Mods mentioned adding custom indicators as resource files? And they gave me a link to the...
Hello, One thing I can't get my head around with MQL, is changes to broker server times (e.g. for daylight savings) and the impact on MQL functions and expert advisors. I have several EA's that only trade at certain times of the day. I limit the trade times using either TimeCurrent(), or Hour()...
Hi, I'm wondering if MaxLots = 10 means that only 10 can be purchased totally or is it possible to purchase 2 * 50 ? I've tried on a demo account and I can add others lots of 10 to my position. So not sure about that
I have been testing some EAs on the Strategy Tester.I have used data (1M) from Alpari, FXDD, and Dukaskopy.Max Bars in History and Max Bars in chart were set to max 9s and the system defaulted to its maximum value.No mismatched errors and Quality 90% in all of them.I was expecting differences but...
[Deleted]
Hi, why SymbolInfoDouble() shows 0 for ask and Bid with all symbols? string Prices(){ int total = 1; total = SymbolsTotal(0); string all = "Time,Open,High,Low,Close,Volume,Ask,Bid|||"; for(int i=1;i<total;i++)   { string s = SymbolName(i...
Ifrequently find that my MT5 EA is not performing correctly because auto tradingon tools/options/auto trading has been un-ticked by the system. Is there anyway I can write code into my EA that would make sure auto trading was alwaysturned on when it runs?
Dear coders, I'm trying to improve my Martingale EA, by adding a new SL method. Namely the x candle low for long trades, and for short trades the x candle high. If the previous trade was a winner, the EA will calculate the lotsize with this formula: lotsize = ((Risk_per_Trade/100.0) * money )...
Hello everybody,   seems like since build 950 terminal.exe does not respect provided configuration file as argument which results in several issues: 1. no possibility to start mt4 in preconfigured state 2. no possibility to run EA backtests in batch mode (automatically) Can anyone confirm this...
  The Graal  (2)
Hi, I've been toying with the Graal 2 Ea from this article, https://www.mql5.com/en/articles/1413 and back testing gives different results from Everytick and Open Price. I was wondering if someone would be able to code in a parameter to only work and modify the orders for a new bar or Open price.
I trade by an EA. In experts & journal tabs, it shows that there was a trade opened with a certain ticket number. But when I checked it in trade tab and account history tab, there are no opened / closed order for that ticket number. Is it possible, as I figured out that 3 minutes later after the
Hi Guys, I'm beginner trying to code my first EA, however I met some problem that may beyond my knowledge. I'm buiding an EA to open position at predifined space. It worked out only the second trade is opened based on the predifined space. Others just open, could anybody show me where is the...
[Deleted]
hello, someone know an EA that can schedule stop of all EA running? So we can decide for example to kill EA and/or close orders, the day with market mover news. Ideal is have something like a calendar where indicate run/stop preferred days Thank you so much Gianluca
Goodmorning traders, few questions for you - autotrading open position even offline (i mean when pc is turned off)? - if i apply two different EA in two different charts of same cross, what happen with autotrading? - I use trading212 as broker atm. Is possible to link metatrader5 to trading212...
I am new to OOP, and I have read some articles on it, but I do not know how to implement it. an order class has ticket, open_time. MyOrders have 10 tickets in array I would like to call them by MyOrders[0].ticket = 123; how do I do it? int max_order = 10;class Order{ private:...
  scalping ea help  (1)
I am not good at coding so i took parts of codes that i have found on the internet. I would welcome any help with what i have so far. <DECOMPILED CODE removed by moderator>
Hi folks, I need to work an EA to identify support and resistance levels and I'm confused how to define and find those levels. I have read so much topics that I need your opinion about what is the most accurate. I have read the several articles using: - Fractals (https://ta.mql4...
How would I code for an EA a close in the top or bottom quarter of the bar? Thanks.
Hello, I would like to assign the EA to order many currency but i don't know how to write. - I assign magicNo of order "EURUSD" = 835, Then if the EA don't find MagicNo "835" (No order EURUSD). The EA will open order "EURUSD". - I assign magicNo of order "AUDUSD" = 478, Then if the EA don't find...
My EA is based on price action on the analysis of each of the bars. But every time a Stop Loss, Take Profit, or Stop Order stays open from one day to the other, when next day market opens on a gap down or gap up, the strategy tester of the meta trader accepts and considers the order being filled on...