Download MetaTrader 5

MQL4 and MetaTrader 4 - page 781

To post a new topic, please log in or register
Please, Does anyone know if there is any way to get the price at which the broker requotes a trade request, from an EA? I tried the below: 1. Call RefreshRates() after OrderSend() gets requote error message (138) 2. Call MarketInfo(), to get current market price but the price I get is not the...
Hi, I would like to scan the last 24 hourly bars and find the 9 o'clock bar then store its open. Is there a function that return only the hour for each bar something like iTime(NULL,0,i)? How else can I solve the problem of finding the 9 o'clock bar? Many thanks
The question is as above in the subject. Has anybody any idea? What MQL4 expression use for assign the expert to the only one computer? The best way will be use mainboard s/n...
Hi, I would like to know how can I execute a calculus only once per bar. I was trying to compare current time to last bar beginning time, but it did not work and to me it makes no sense. I already read others posts here, but I could not find any solution that worked. Thanks #property copyright...
  ASCTrend system (493   1 2 3 4 5 ... 49 50)
I start this thread for the following reason: - to develop ASCTrend EAs according to the manual trading systems described here https://www.mql5.com/en/forum/173249 and - to delevelop new asctrend system for M5 timeframe. Please find updated templates (3 templates) and all the indicators for this new...
can someone show me what needs to be changed to get the following code working? I'm having 2 pending orders, which need to be modified (with magicnumber 222 and 333). When a green line on the chart is moving, it needs to adjust the openprice, TP and SL on the pending orders. Here is what i have done...
So I just realized that you can take moving averages of indicators in metatrader. I've been getting some decent (manual backtesting) results by taking the EMA of the ADX and combining it with the PSAR, and I'd like to automate this system. However, I need to somehow define this EMA-ADX combo...
My name is cesar, and I need your help, i have a great strategy but i don't programming in mql4, so i need that if you create this EA, Description Pair: GBP/USD Time Frame 15 minutes I need that the EA calculate the high level and the low level before the london opening, I need that EA show the...
hi everyone good day i have this EA, but does not attach with my gbp/usd chart, my I help please thanks
I copied EA's to MT5. They do not appear in navigator indicators. I tried expert too, and they're not there either. I copied to program files\ metatrader 5\mql5\ indicators. They do appear over in program files folder. I installed EA's before in mt4. So I know how to do this.Any help, Thank-You.
Within a Script, I would like to open a new chart, but can find no documentaion on how to do this. Ideally, I would prefer to skip the solutions that include sending keys to the main terminal window (i.e. ALT-F N). I have found examples of how to attach an EA to a chart : int MessageNumber =...
  Tandem trades (3)
I have heard of a service where a trader has a stable of customers and each trade the trader makes is made in tandem on each customer's MT4 platform. The size of the position is in the ratio of the trader's account and the customers' account balances. How does this work technically speaking? The...
Hello. I would like to know how to make an indicator that takes past bar values. I have this code in the special function star: Buf_0 [i] = IMA (NULL, 0,13,0, MODE_SMMA, PRICE_MEDIAN, i)-IMA (NULL, 0,24,0, MODE_SMMA, PRICE_MEDIAN, i); If in one of the indicators, I want to select values of 3...
Hello. I have a problem with all Custom indicators I use: when I asociete the indicator with some price-screen, the screen goes gray, and don't let me select anything with the mouse. sombody know why is this? thanks againg trader201
what is wrong with this code. it doesnot work.. if (OrdersTotal()==0)             FileDelete ("mydata.dat"); I am just trying to delete the file if there are no open positions. thanks in advance..
I've written some EA which I backtested on 10 years of 15min EUR/USD data If it shows consistent profit through all that period will it be normal to assume it will work for the next 10 years ?
How do I run a script within an indicator? Thanks ...
  Error 4109 (2)
Error 4109 Meaning = "Trade is not allowed in expert properties" Can anyone please tell me what his means and how to fix it.
How can I export the trade tab in excel ? Thank you, saluti dall' Italia, Scheggia97
  Need CMO (2)
I am not find the Chande momentum oscillator. how I will get it ?
  &_____ ...??? (2)
What does it mean to place an "&" in front of a variable .. example: somefunc(int ...., string &var1) {..} can I use "&" with ints, doubles? &Thanks!
Hi, Is there a way to find out that a pending order has "entered into market". I'm developing an EA and I'm checking if the pending orders are in the market using the price, but sometimes the spread variation and some fast price action, I miss the correct entry point. Any ideas? Best Regards
Hi All, i have problem in deleting pending orders, my ea opens 2 pending orders one BuyStop and the other SellStop. When one is opened the other should be deleted. Please tell me what is wrong with my code: double   FindSell;bool CloseBuy;datetime t;for (FindSell = OrdersTotal()-1; FindSell >= 0;...
Hi, I am used to do some backtests with the data of metaquotes. For that, i create a new folders in the hystory folders where i copy the xxx.hst files i need (usually M1) and the following files : symbols.raw, symbols.sel symgroups.raw and ticks.raw I have notice that the spread used for backtest is...
Hi All, I'm a newbie MQL4 developer and want to write an EA which amongst other things, would be able to access the current data value of a proprietary Indicator. I stress it's JUST the Indicator's current value that I need at EA execution time (as can be seen in the Indicator's window on the...
I am hoping that someone might tell me how to reference or set up a horizontal line, that when added to the chart will only appear in the area to the right of last price bar or candle and adjacent the price axis. I am happy to add the lines manually. Seems this would be a good way of removing...
New article Orders, Positions, and Deals in MetaTrader 5 is published at mql5.com: Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from...
I'm tring to use orderclose/ordermodify. I think before use that, I need to use orderselect. I have this code: if (condition1) { OrderSend(OP_BUY...) } for(int i=OrdersTotal();i>0;) // this is for select order if there are orders opened { OrderSelect(OrdersTotal(), SELECT_BY_POS...
How can I make a certain price level like the Low[1] to be a constant? My aim is to set a level of the previous bar as a stoploss that will work if the close price of any of the next bars is lower it, but not the bid (current) price like usually.
If using my EA I sometimes get this message, but I can still manually access the Trade Server. However, as I want to run the program continuously, this is a problem. In the worst case, my program can initiate a trade but then if the connection breaks down, my EA can not close the trade when...