MQL4 and MetaTrader 4 - page 864

Hello, I subscribed to a signal, then the signal tried to do an order on XAUUSD and the journal said symbol not found (Even though my broker has it, I do not know why it said not found) and then it unsubscribed. Is there a way to make it stay subscribed when the symbol is not found? Also does...
[Deleted]
iHigh(Symbol(),PERIOD_W1,1); // returns zero in backtesting Why does the above function return zero in backtesting but the correct value in real time testing? Is it a platform limitation? Or is it something specific to my local installation? I would assume the latter as I seem to recall using this...
  how I code?  (4)
int orders= OrdersHistoryTotal();if( OrderSelect(orders,SELECT_BY_POS,MODE_HISTORY==true))    {     if(OrderType()==OP_BUY) //Month()==12 Year==2013  )        {      OrderSend(Symbol(),OP_SELL,,Bid,1,,,"",MAGICMA,0,Red);           return;        }  else if(OrderType()==OP_SELL)...
Hi all, Just going through the MQL4 book. It says that limit orders become market orders when the price is hit. So does this mean there are no actual limit orders in MT4? Thanks in advance.
Anyone know if is it possible to get the actual price where two lines intersect as this usually happens in between bars ?
I might have found an ugly bug in the Optimization side of MT4 build 509, related to the new Spread control feature. After running an optimization for the first time, with a Spread value of say 40 pips specified in the new Spread control box, if you just change its value to another number (50 pips...
If the candle doesnt have upper or lower shadow does the High[] and Low[] return the highest/lowest point of that candle so an Open[]/Close[] value depending on the type of candle (bear/bull) or is it return an empty value?
[Deleted]
Hey guys, this is my first post and just wanted to say thanks real quick to everyone here who has contributed. This site is a goldmine as long as you're willing to take the time, be patient, and use the search function. So anyway, after a long struggle but eventual success, I created a script. The...
[Deleted]
I have M1 for USD EUR loaded in a single MT4 offline test installation : My Code code at Start = double Hilfsvariable2= (Close[0]); Print("Aktueller Close ",+ Hilfsvariable2); I expected the get one close for each 1 minute candle in the mt4 journal: These are the lines in the history center:...
[Terminal Panel] at the bottom of MT4, which can appear by "Cntl + T." TODO_01 : assign the different value set for different currency pair in the row of the terminal TODO_02: change the font size bigger perhaps the height of row of the table, too, accordingly. Which file in the source code...
Hello! good afternoon. i want to modify attached source to suit what i want style. this is trend line alert and if price line cross then alert fire but it every bar alert fire so i want to try to make it only one times for alert but no luck. i was used static datetime Time0; if(Time0 ==...
  Good for the day  (2)
Hi HoW easy is it to program a Good For The Day where; the EA will look at order history just for the day and see if it has gotten like 10 pips? thx
I'm using an indicator called 10.2 TMA slope, and although it compiles without errors, and even works in an EA, when I backtest my EA, a whole bunch of error messages pop up in the journal saying, \ 10_2 TMA slope v1_4B 4_30 for EA EURUSD,H4: unknown subwindow number -1 for ObjectCreate function....
I want to substract the minute value as 10: eg: if i give 00 means it should consider 50, 50 means 40,etc... tried following code. but it seems wrong. can you suggest exact idea to substract the minute? extern int newsDateMinute = 30;newsDateMinute -= 10;
Dear All, I tried to write a 2 ma crossover ea. It seems I don't get into making trades for some reason - can anyone help by looking at my code which is very short and explain what the problem could be please?...
[Deleted]
Hello! I opened a sell order a wee more than one minute before the market closes. It shows 21:58 in my case. My order was closed a few seconds after at 21:59 with 2.85 loss as you can see. The balance was 9.89 dollars. So my question is that what "so: 91.1%/6.8/7.5 means in the comment tab and?...
[Deleted]
Hi Everyone, I have a custom indicator, attached and I write a script to export data of this indicator. This script works with other custom indicator and for some reasons, it doesn't work this time. I very appreciate your help if you could look to see what is the problem with my code. Thank you and...
Hello, I am working to make an indicator which draws two lines making a range from a 22:00 to 06:00 everyday & continue till value changes next day at 06:00. I have used the iHigh & iHighest functions but I still need to give the Shift Count of the bar with highest high & lowest low in...
Does this differ amongst different signals because the is the second signal that has done that. I thought it just copies trades as they happen on the provider's terminal?
I want a native version MT4 for MAC OS, not virtualized !!!!!
[Deleted]
I'm testing my EA at the moment and looking at disaster recovery. I have noticed quite frequently, the terminal loses connection and doesn't always automatically re connect. It takes me to press the rescan server button to re establish connection. This can be some hours later if I'm away from my PC....
//+------------------------------------------------------------------+//|                                                 ForexSession.mq4 |//|                   2011-1-18 16:30:18 oldz.cn@qq.com         OldZ |//|                                        http://www.metaquotes.net...
Hi, I am testing my strategy and I have good results in my test, but when I test my code in real, I have problem that I can't solve. I would like to share my code and ideas with you, and I would like to know if you will help me to solve the little problem and to improve the strategy, because I think...
  time of event  (3)
hello, I would like to find out the time of the execution of an event i.e if it is an arrow drawn by the indicator or the time an order executed. how can this be done? thank you in advance
hey guys I'm looking for an EA or someone that can program me an EA I have something very simple in mind and would have programmed it myself but just can't wrap my head around the language. please assist with this I might be willing to pay for this: Email me on jitzu1@live.com if anyone might be...
From searching the forum, it seems that: a) the start() function of an EA runs in a new thread created by an incoming tick. If its still running when a new tick arrives, the new tick gets 'missed' by the EA b) custom indicators run in the main GUI/interface thread, unless called from an EA....
I am trying to delete several buylimits orders when the Stochastics are in the overbought area but the code seems not to work. Where is the problem?//------------------------------------------------------------------+void CheckForDeleteBL()  {   double DValue;   int Total,cmd;   bool result;...
[Deleted]
Starting to get a bit more in depth with MQL4 and need some help. Lets say (for example) the price hits 1.5000 3 times in one day. I would like to buy it on the third time. Is there any way MT4 can record how many times an event has happened? I guess my problem is that i want to open an order after
  Why is so much code like this?  (32   1 2 3 4)
I see this a lot when people post their code. if (a==b){ Dothis; Dothis; etc; } Now, this is not a problem when reading short pieces of other people's code. But when their is a lot of code, it can make it almost impossible to follow. I would think that many would have difficulties finding errors in