Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1185

To post a new topic, please log in or register
Hi, is there a way to specify in EA that a certain action (open order, close order)is performed provided some conditions are fulfilled but ONLY after the candlestickof the given time frame closes? I am working with Heikin Ashi candlesticks and want to enter the market upon acertain color of it....
  Matlab.Data (1)
Hello, Is it possible to get historical data of EUR/USD into Matlab from MetaTrader? If I took daily data from MetaTrader for EUR/USD from 01/01/2007 to 20/01/2008is it possible from Matlab to update my data to today's date? Thanks, Miguel
Hi, is there anyone who has an indicator that shows Actual closing price in Histogram?It shows bull and bear respectively with designated Colors. It is much like this one but this indicator only shows closing price generallyin one color and does not indicate if the last bar was from a bear or a...
my EA just stops working for no apparent reason. has anyone else had a similar problem? here is the code if you can help:
Hi, In "Displaying a News Calendar" code (Author: Slobodov Gleb), I have asuggestion. Add new lines (highlighted with "<<---- new line" below) in GrabNews() function, and news calendar display only that currency. Example: If EURUSD, display only news about EUR or USD. void GrabNews() { int file =...
small problem but can someone please help me!!! just trying to draw a line on the last hour. So if it's say 22:45 it draws a vertical ine at 22:00 ObjectCreate(OH, OBJ_VLINE, 0, D'2008.01.24 22', open_price); works fine, but i need it to be dynamic so its like Date() + TimeHour(TimeCurrent()) or...
hi... A question regarding histograms......first what I did was to use a standard indicatorthat pretty much only counts bars,,like example the momentum indicator, and I justchanged the calculation at the end to display what I needed....all I was doingwas showing a histogram of the Close - Open.....
Could someone please help me with some language to make my Expert Advisor tradea percentage of my balance? For example, I would like each trade, instead of beingx number of lots, to be 10% of my current balance. Does anyone know how to do this?The more explicit the details the more helpful it would...
Is there any way to code the acceptance of a broker requote in MQL4? I see themin the journal but see no function that uses requotes as an argument and brokersonly allow a couple of seconds to accept/reject them manually. This would be avery useful feature in an expert I'm writing. Thanks.
int start(){ int counted_bars = IndicatorCounted(), limit, k, kperiods=100; if(Bars < kperiods) return(0); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit = Bars - counted_bars - 1; for(int i=0; i<limit; i++) { k=1; if(iCustom(NULL, 0, "ZigZag", 12...
On the website of the Automated Trading Championship 2007, the article Winners of Automated Trading Championship 2007 has been published. The Winners got their prizes and awards and shared their thoughtsand impressions of the Championship with us. The full text of the article was published on the...
I need my SL derived from High/Low of Bar [2] but cant seem to use High / Low toset SL. For example: double stopLoss, takeProfit; stopLoss = (High[2]-Low[2])*2; if(BuyPrimCheck1() && BuyPrimCheck2() && BuyWickCheck() && BuyDisplace() == true){ ticket=OrderSend(Symbol(),OP_BUY,10,Ask,3...
Hello I am looking for information on API interfaces, there are some examples?
Was wondering if anybody could help me, when I try and run the strategy tester thescreen just says "Waiting for update" and never works? This works onmy pc but not on my laptop, any ideas anyone? Thanks
hi all my name is paul. I have been trading a mini account with FXCM for about 6months and came across mql4. I really like power of the system modeling and backtestingcapabilties. My understanding is FXCM is scheduled to have mgl4 soon. I am particularlyinterested in 4h and 1d trading. I have many...
My Matlab function has a matrix output. If I call it from my EA, how do I deal withit ? If MQL4 can not handle it, how shall I get around it? Pls help me. Thanks
  Chart help (2)
Hi all i am new to meta trader. I was wondering if someone could help me with aproblem i have. In the charts i have two ema's but when a candle appears the ema'sare hidden behind them. Is there a way to show the ema line in front of the candlesall the time? Thank you in advance and good luck success...
  tool bars (1)
How do I keep from having to reset my tool bar every time I log on?
I'm a beginner, tried many sample expert advisor scripts but all my scripts arestuck in init() not calling start() at all. So I tried a easy stuff to troubleshoot:int init() {//---- Comment("inside the init");//---- return(0); }int deinit() {//---- Comment("inside the deinit");//----...
Hi Other than writing to a text file format, does MQL4 support INI file writing format.If not, does anyone knows how to do it, may be calling dll file function from theEA, how to import a dll? any known good dll file can support INI file read /writefunctions. Many thanks Tom
Hi guys, The problem looks something like this: You have two simple indicators, for ex. two moving averages, and one EA attachedto the same chart. It's a very simple EMA cross EA, with some experimental codeimported from external DLL that makes it change it's EMA indicator parameter...
My matlab function is like this: Y = Myfunc(v1,v2) The ouput Y is a cell array {y1 y2}, y1 is a 1x1 matrix, y2 is a mxn matrix, IfI call this function in MT4 via DLL, how can I get the output to MT4 environment? thanks a lot.
Hi, I'm new in using MQL4. I'm just wondering why can i only see the pop-up of Print()and MessageBox() command one time only when i first drag the script or expert inthe terminal. It don't work the second time. Why is this happen? Is there any rulesabout these TWO commands that i'm no aware of?...
Hi everyone! Need some help to code a double smoothed EMA. The derfinition is: Double Exponential Smoothing (DES) applies Single Exponential Smoothing twice. My code has still a mistake, hope somebody can find it: //+------------------------------------------------------------------+ //| double...
Hello, This code's purpose is to check if there's any active order opened by this EA.If none, it will open 2 orders, buy and sell. I haven't test it on real marketbecause it's sunday now, but from backtester, there's no trade appear. What's wrongwith these codes? int ordtotal=0; for(int...
Hello I have a lot of open buy and sell 0.1 unit positions. I need to know exactly how many of them are opened. Instead of counting them manually,is there a script which counts the number of open positions i.e. "you have57 open buy positions" ?
Hi, can U tell me how to make an EA open only one position per one bar? Cause now it looks something like this: I also don't want to use "if(OrdersTotal<1)" used in many codes becauseI want to have more than one order opend at a time (but not in the same bar) Thank for any help, Jan
  old tick (6)
Hi, what's means when "Old tick" appears on Diary?? thanks Bolla
Hi, DDE or whatever. There's a suitable protocol? I expected to being able to exportindicator's historical values in as easy way as for historical quotes. Thank you so much, SA
I have a problem with my metatrader. My computer hanged When metatrader4-V202 runningfor about 10 minutes. Please help me .This problem confused me.