Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1151

To post a new topic, please log in or register
Hello! Is there a function to tell the EA what was the initial deposit amount? Thanks!
Please see the example below. I opened a BUY order of 80 lots (I know it's a crazy size. I just want to amplify the calc) for USDCHF at 1.16783 and the current price is 1.16753. It shows my current profit is -2055.62. 1. How did come up with -2055.62? It showed my Balance is 90342.33, Equity is...
I would like to write an indicator that matches bars in the 1 minute time frame to bar number 1 of the 15 minute time frame and then to draw a rectangle around those bars in the 1 min time frame. I'd appreciate if someone could give me an idea how to code that. Here's the illustration of what I...
The following code subtracts the close of 2 bars. The resulting value (CloseDiff) is zero but the 2 close values are not the same. I verify this by PRINTing the values to the expert panel. Can someone explain what might be happening here? I am stumped. double CloseDiff[]; for(i=0; i <= Bars;...
I don't know if this even possible: Can I open a new chart in MT4 with code that's called from an EA? I have an EA that monitors more than 1 symbol and when a particular condition happens, I want the chart that relates to a particular symbol/timeframe to open within MT4. Is there code to do this?
Hello guys. I´m using a EA, but I have to make it do like this: ´´just start another trade after 3 hours of the last opened order´´. For example- I want that my EA open a new trade, and close, after, wait for 3 hours to start another order. Thanks guys.
This morning I tried to close a trade with my demo account. The message, "sever busy, please try again", kept coming up until I closed the program, reopened it and was then able to close the trade. I lost money on the trade because of this. Has anyone encountered this before and is this a regular...
How to add 2 or more indicators on 1 indicator window. (not for coding)
How do I get the angle of 2 candles as in price1=iClose(Symbol(),0,2); price2=iClose(Symbol(),0,1); Now, I need tofind the angle of the line made by the 2 prices. How do I achieve this.
Re-starting the same EA test with the same symbol, same date range (historical), same timeframe, same parameters produces different results. I've eliminated things which could change, like MarketInfo values and everything else that is left should be static. But different test runs produces subtle...
Hi there, I have decided to post this thread, since I believe to be a very important question that all of us want to see answered. Many of us have already tested manual and/or automatic strategies, and the functionality of all of them differ on ranging/trending and not ranging/flat markets. I think...
On the website of the Automated Trading Championship 2008,an Interview with Yuri (Gorez) has been published. Yuri known as Gorezto us is on the first place of our rating already for the second week.Such a result is a real surprise for him. He is acquainted with forexsince 1995. He tried to trade on...
Hello Friends .... I need help ... I am working on an Excel spreadsheet with DDE. However, the pair EURUSD not upgrade and appears N / A in the cell. Can you help me? thanks Health and peace! (Excuse me for English by Google.)
Hi, I want to close an order either BUY or SELL at current price, but I use the following function in vain. Please help. OrderClose(OrderTicket(),OrderLots(),Ask,3,CLR_NONE); // This is for SELL orders OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE); // This is for BUY orders When I ran this...
Can anyone explain to me how I would set a custom indicator into a series array? I need to find the highest/lowest value of an indicator for a certain number of bars. I did read somewhere that explained I would need to place the indicator into a series array then do ArrayMaximum and ArrayMinimum to...
Hi there, I really need your help with a sample code routine that allows me (perhaps there will be more than one routine): - Start trading after a specific number of bars when opens a new day. When a new trading session opens, it must wait for a specific number of bars before open new trades. - Do...
  close order not working (12   1 2)
this code looks right to me, but I must be missing something because it will not work... Open order- if (OrderSelect(123456,SELECT_BY_TICKET) == false ) { OrderSend(Symbol(),OP_SELL,1,Bid,3,StopLose,TakeProfit,"Short Open",123456,0,White); return(0); }...
Hi everyone ... I'm trying to find out how to get variation percentage for prices in relation to their last day close ! In my routine, it's more important to have percentages than absolute values. I couldn't find any configuration that could give me this. Has anyone got any idea ? Is there any...
Been trying to get an EA to work right for 2 weeks now. nothing i try works. if i get the close to work, it wont open, if i get the open to work, it wont close. every code bit that i try to get it to work on a new bar only either does not work or runs multiple times.... This code is no where near...
If you have something like the following in the code, where/how does it derive the value during Testing? double TickVal=MarketInfo(Symbol(),MODE_TICKVALUE);
Using the command line compiler, MetaLang.exe, to compile .mq4 files, it shows the following format: 1-2 ; warning/error code; file location; line#:column#; description of warning/error My question is this: Where can I find a list of the warning/error codes for the compiler? For instance: 2;88 -...
When I set a buy or sell stop under pending orders the accepted order appears in the trade screen for maybe a minute or so then disappears; appearing in the account history section. I am new but have read the information on stop orders and thought it was straight forward....maybe. USD/CAD - price -...
Hello. I'm in trouble to import other indicator's value into an indicator. If in example i want modify the RSI, having in it also the MA value, i try to use iMA function, in example like this: double MA; MA=iMA(NULL,0,Period_MA,0,MODE_EMA,PRICE_CLOSE,0); or also like this double bufmapre[];...
  bug in MQL4 (3)
I found a bug in mql4 language, please try the following code : extern int GLP=25; int start() { double y=GLP/100; Print(y); return(0); } it prints 0 ! it should print 0.25 tested on MT4 build 218. Regards
Hello, For my backtesting validation I need to increase the limitation of Max Lots value. MarketInfo(Symbol(),MODE_MAXLOT); => 100 Lots When your account increase above 300 000 $ this limit is easilly reached when trading. I heard that some brokers offer about max lots of 1000 lots or even more....
I want to determine the chart symbol from a custom indicator or expert - can this be done and how. I can get bars, period etc but cant find anything for symbol
Hello there! I uploaded an EA authored by Coders Guru. I like the waythis EA works, but it has no stop loss. If it wouldn't be too much of ahassle, can a programmer please add a stop loss to this EA. Thanks!
unable to find a link on how to be able to get this data on any bar on the chart sure could use some help
This is not a scam and this is not a joke. We are a real and fully licensed proprietaryforex trading firm based out of Houston, Texas and we are looking for programmers to create lucretiveEA's for us. We will pay as much as $5,ooo for your EA plus split the profits 50/50 on a $50k Live account for 1...
Does anyone can help me with a code that allows me to get a signal from an indicator just when the new bar opens? This way I can make sure the signals change on some indicators does not disappear... If you provide me some sample, I will try to include it on the indicators I want Regards Paulo