Download MetaTrader 5

MQL4 and MetaTrader 4 - page 847

To post a new topic, please log in or register
think an order has exucuted. after few minutes think its hit the TP .after that what happen to orderticket. when we use orderselect then will it returns false or what.how to determin whether that order still exsist or in history
Hi, I'm trying to determinate how many margin I need to open 1 lot of a cross. For example, I want to open 1 lot of EURUSD. I would like to know the margin I need to open this lot. It seems easy but it's not the case for me... Here are the possibilities: 1. Margin = MarketInfo("EURUSD",...
I need somone to code for me the foloving EA Buy signal: -price must close abave 5 sma -stocastics value line must be below 15 -stop lose adjusteble,TP adjusteble Sel signal: -price must close below 5 sma -stochastic value line must be abowe 85 -stop lose adjusteble,TP adjusteble (MA must be...
  help needed (2)
Hi,I'm trying to make an EA that only places one trade at the time. I loop through the open orders to see if there is any trade open from this EA. If one of the magic no's is found, trade should be set to true and ordersend should not be executed. Thing is; it doesn't work. While backtesting it...
I am familiar with the typical example in MetaTrader which allows only one trade at time: total=OrdersTotal();   if(total<1)      {      .....     } But how can this be altered so that it can open one trade max per pair?
i need to find the top (or bottom) of the price from last night 02:00 but i have condition so if the first doesnot match i want to find the next top price later in the day . the ibarshift( ) can help ? how ?
I recently downloaded a custom indicator from this site and once I applied it to my charts, I noticed that if I change the time frame or even close and reopen my platform, all the previously drawn bars in the indicator disappear! Is there something missing from the code that would cause this? I need...
i have a C++ dll that calls a C# COM dll my c++ dll is of course called by MT4, and is just a wrapper for my C# stuff. t my c++ function, analyze(double *opens), needs to convert the double array to a SAFEARRAY I googled and found some sample code that helped me. I came up with this: for (int i...
Hello Everybody... Please some one guide me how to write the code for export the chart data in a .csv file (like click on file -> save as)
I would like to script for an export of several history files to .csv format. Manually I go into the History Centre select a currency pair, select the time frame and click the export button. Is there a way I can create a script that will do all this automatically for the history of a number of...
How i can do it export past daily data in csv file, i try to add thi on my chart but don't work if i put it in scripts it's work but give me just one day!!! i want like one year high,low etc etc of daily bar int start()  { static int  flag; int handle,i;...
I need the info on how to make MT4 transferring the CLOSE value of daily for the days: Yesterday --before yesterday-- before before yesterday..etc.. in other words : for at least 5 passing days NB: I know how to transfer Bid, Ask, H, L --- but not daily close nor open . Thanks
Guys, I just discovered DDE and able to get live data to excel, fantastic stuff. I like to ask someone, how and where to get started if I want to record the data of OHLC of certain time frames, for example at the close of the hour, I want data of the last hour in 60 min candle, 30 min candle etc......
Is it possible to get historical data from mt to excel through dde server. Eg: The last 500 4 hour OHLC? Regards to ALL dsg7012
Hello, I am trying to play a .wav file using the PlaySound function after calling an Alert in my indicator. If I remove the Alert function from my indicator then the .wav file plays fine. Thank you, Darren
PLEASE CAN SOMEBODY TELL ME HOW TO SELL & TO BUY ALSO WHEN TO ENTER MARKET?,;?
  Chart drift (7)
Does anyone have a problem with objects drifting on charts? For example, I have an EA that draws a line and some text at the top of each chart using WindowsMaxPrice to find the maximum price (it deletes the old lines /text and creates new ones each tick). This normally appears at the top of the...
I have a windows based Mobile the phone is touchscreen, is there a specifically designed Mobile platform which can be used on a Touch Screen windows mobile If so can you point me in the right direction please. Thanks
Hi, I have a problem with MT4 Opening a Deal, then Closing it again straight away. It happening with MT4, Built 226, with 4 different EAs and two different brokers. It only happens occassionally, but has cost me about $4,000 in losses from the spreads Basically, MT4 * Opens a deal * Closes is...
New article Contest of Expert Advisors inside an Expert Advisor is published: Using virtual trading, you can create an adaptive Expert Advisor, which will turn on and off trades at the real market. Combine several strategies in a single Expert Advisor! Your multisystem Expert Advisor will...
So i moved my installed MT4 folder from Program Files (x86) to C:\MT4, opened 4 new demo accounts, and this is what i see. Is there something else that needs to be transferred or a registry value that needs to be updated? I'm on Vista home premium x64.
Sometimes I am making an indicator that reads some input from the chart using ObjectGet function,e.g ObjectGet("PivotLine",OBJPROP_PRICE1) which will get me the price which represent Pivot on the chart. Is there a way to use ObjectGet function to read text of a label? Thanks
  Slippage? (4)
Hello, Here is my problem! I want to open a order at the market, I do not want to have a OrderSend failed due to the slippage. How to do it? Slippage = 0 and the Price = Ask (for a buy) ? OrderSend(Sym, Op, Lot, Ask, 0, 0, 0, Comment, Magic, 0, CLR_NONE); Thanks
hi there, is there a way to detect non-hedging brokers automatically inside mql? or do i have to make workarounds? regards
free graphical and numerical spread indicator that works in real time. Features: * Graphic and numeric * Customizable * Works in real-time * Can be used in multiple charts Video:
Please excuse me for what maybe a very simple question, but i am just a beginner and came to GURUS of the MT4 for help. I have an indicator that send out an alert ( message box ), How would i capture this alert from EA? I know how to place an order through EA, I just dint know how to capture that...
I have been trading for a while now and one technique I use for my stops, is that I stop out the trade ONLY if price can CLOSE past my stop level. However, it doesn't seem that MT4 has a built in function for this. I have been looking all over the internet for quite some time and cannot find any...
  64 bit MT4? (15   1 2)
I'm using some rather memory-hungry methods in my EA since it necessitates the use of very large multidimensional arrays. The 32-bit memory address limitations are forcing me to use a much shorter history than i would like, and i'd really like to take advantage of 64 bit memory addresses and...
I am trying to develop an adaptive moving average indicator based on Perry Kaufman's method. So far, I have modelled the indicator in excel and I am now trying to code it in MQL4. I haven't gotten very far and could do with some help if anyone would be kind enough? Here is my code to date:...