MQL4 and MetaTrader 4 - page 520

To post a new topic, please log in or register
Hi, I've encountered a strange behaviour with the display of an indi: The attached screenshot shows different values for the thin red line: the value shown in the data window and in the cross hair is 100.28. While the value shown in the y-axis of the chart is 100.58, which is the correct one. For...
Hi, Can any one tell me how to get OHLC data from mt4, I want to save OHLC any time frame say 1 min or 5 min. I am using MTFOfflineChart5 to collect data in CSV it's working fine and giving me realtime Time,bid,ask in CSV format. But I want OHLC data directly from mt4 either in CSV or json...
I am writing an EA that uses 4 separate Take Profit levels, so I am using the following code to enter the trades. sv = InitialStopLoss*Point;for (x=0;x<4;x++){   tv = Ask+targetValue[x]*Point;                        longTicket[x] = OrderSend(Symbol(),OP_BUY,tradeSize[x],Ask,slippage,Ask+sv,tv,""...
Hi, please help me. This is what i want: I open order on bar. After 3 new bars, this order will auto close
I am waiting ATC 2013. When does it register?
Hi all, One question, on mt4 on bottom right where is the symbol of connection satus some times this symbol is half red and half green other times is all green. Could you tell me what these colour differences are all about ? Thank you in advance Luis
I made this function to normalize price if it needs to be rounded for pairs like gold with ordersends... What do you guys think about it? Have I gone about it correctly?   double normalizeprice(double price)   {      if(MarketInfo(Symbol(),MODE_TICKSIZE)>MarketInfo(Symbol(), MODE_POINT)) {...
can i choose the account name when i sign up with a broker or can i change it later on ?
hi i am placing tp\sl but gets an error invalid stops even when there is a difference of one pip following are some log EURUSD,M1: Sell Order Modify failed with error invalid stops EURUSD,M1: Order open price = 1.32034000 EURUSD,M1: Calculated Stoploss = 1.32048000 | Calculated TakeProfit = 1...
Hi, ocassionally my EA encounters error=132 or error=2 when OrderSend. What exactly do they mean? ("market is closed" & "common error") Is it EA related? and if so, what kind of mistake in the EA could cause this error and how to deal with it? with many thanks in advance.
Hello, There are predefined variables such as Bid and Ask. What about the symbol? Is there a variable for that also? Thanks
OrderClose(OrderTicket(),..... Sometimes my EA cant close an order. If the system has lost the ticket number, how can I close this order? I need a function like CloseOpenOrder()
Hi, My EA has a function that does Take profit and a certain points stop loss which is passed in OrderSend. So in my OrderSend for example, TakeProfit = 0, StopLoss = 50. Now I want to identify if a particular order was closed due to take profit function or stoploss triggered. How can I check this?...
Is anybody notice USDJPY chart has one more bar at the same chart scale? I think this is a bug and I believe this bug isn't exist before Build 482,but I'm not sure.I didn't notice this before until my EA occur strange problem in USDJPY.
Dear guys, I know there lot of topic in this forum about dll. I just need a suggestion which program language easy to learn for me. I am C# coder. I am well know about C#. but MT4 does not allow to use C# dll. Does any one give me suggestion which program language I should learn.
I have no idea why... There is no problem with the functions isLongTermTrend() and isHigherThan(), because I use them in an EA and they work fine there. //+------------------------------------------------------------------+//| LongTermTrend.mq4 |//| Tosh |//|...
I need assistance from anyone who already have the indicator or who can modify/make something that works as follows, please: I need an alert(sound, arrow) whenever the price touches:- 1) 5 EMA high or a 5 EMA low of the 4hour chart and the daily chart 2) 28 EMA close of the 4hour and daily...
Hi, I'm testing this ea and I think it's very useful to close orders, but in my case I don't want to close all open orders, I just want to close only the profitable orders. I've changed the "CloseProfitableTradesOnly" value from false to true, but orders keep closing at 1 usd. And what Im looking is...
Hello to all in the community, I am a newbie be to forex trading. Please I need help with any indicator that can place the chart of two (or more) different timeframes of the same commodity in the same window i.e. a kind of overlaying. Like Place a EURUSD 4hr chart inside EURUSD 1day chart. Thanks.
Hello, For a while now, I have wondered if there is a way for an EA to add objects to a chart that does not have the focus? For example, let's say you have 6 different chart windows open, and then another window for your Expert Advisor... I would like the EA to cycle through each of the 6 windows...
Hello. My expert advisor uses an external dll library, which in turn loads external data. I need to draw some of it on a few charts. I guess it would be easiest to make an indicator that simply reads arrays of values from the expert, using something like an inverted iCustom. Could you tell me what's...
Hello, I am completely new to this forum. I am looking for a place to report the following bug in MQL4: Consider the following simpliflied code: //*************************************************************************** #property copyright "Copyright 2012, MetaQuotes Software Corp." #property...
Folks, I am trying to make a moving average alert such that when price hits a certain exponential moving average, I get an alert. Say for example, on a 15 min chart, I plot 10,20,30,40 EMA. So everytime the price "touches" any of the EMA, I get an alert. Can a kind soul help me to develop this...
  Magic Number? (7)
Hello, i need a little help. I use the code you see below. I use drag this EA on different instruments (currencies) and timeframes. I use the following timeframes: M15, M30, H1, H4. Everything is working perfect. The only thing is, if i have a MA cross on the M15 timeframe the EA closes ALL other...
Hi There. Iam rather new to this forum. Iam not a large trader but been spending last years just study indicators and patterns mostly . While many may trade with their systems i spent a couple of years study different indocators systems etc etc and feel abit bored becouse i just couldnt come to find...
I'll start by saying, I'm very new to programming and mql4 with limited experience, but am doing my best to read through documentation and practice implementing simple strategies to improve. Unfortunately, I've run into a snag with an EA that I have written. I declare a global variable outside of...
The indicator contained in the attached file produces no output. But if I changethe following code diff[i]=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0); to diff[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i); then I can see the output. May I...
Hi all, I use this code below to open and modify order, but if i use for multi pair, it can modify SL after open new order . I get message error : OrderModify error 1 Please help me to repair this code. Thanks a lot . int iTicket;           if (OrdersTotal() > 0)      {         OrderSelect(0,...
Hello All, is any one have indicator that can put 2 macd in the same sub-window? Is there anyone can help me to make a a indicator like this one at http://www.forexfactory.com/showthread.php?t=163700 two macd in the same subwindow, with same with the SAME zero line? and color and the option for...
One of my broker open an order itself in my trading account, they set the stop loss themselves and the order hit SL. loss was $ 3500. and now they are saying that we didnt do this . I want to know the IP address of that order . Can i kow this ?