MQL4 and MetaTrader 4 - page 636

Hi there, When I run the below code I get error code 1 i.e. ERR_NO_RESULT - No error returned, but the result is unknown.  Would appreciate any advice as to how to resolve that. Cheers, B. Ticket1=OrderSend(Symbol(),OP_BUYSTOP,LotSize,EntryLevel,3,SL,TP1,NULL,0...
How to add order comment that will show up on the ticket ?  (not for internal reference) 
int Total = OrdersTotal (); double BalanceUsed = AccountBalance(); double Balance; for ( int i = 0 ; i < Total; i++) { OrderSelect (i,SELECT_BY_POS, MODE_TRADES); if (OrderType() == OP_BUY || OrderType() == OP_SELL) { Balance = Balance - OrderProfit(); } } for
Hi Coders! Is is possible to get the XSIZE of a LABEL OBJECT? I tried this code: label_object_xsize = ObjectGetInteger(0,object_name,OBJPROP_XSIZE); But I got this error message: Unknown object property Thank you in advance. Relative
  Enumerate  (1)
Has any one used enumerated outside of months and years as variable and it worked successful on EA?
those well running custom indicator does not work!!!!!!!
New article Price Action. Automating the Inside Bar Trading Strategy has been published on mql5.com: The article describes the development of a MetaTrader 4 Expert Advisor based on the Inside Bar strategy, including Inside Bar detection principles, as well as pending and stop order setting rules....
[Deleted]
Indicator Trend Detector : http://www.4shared.com/file/125550742/c48330e7/detector.html Detailed Statement : 1st Account : http://www.powereconomic.uni.cc/forex/DetailedStatement%20-%201%20-%2016092009.htm 2nd Account : http://www.powereconomic.uni.cc/forex/DetailedStatement%20-%202%20-%2016092009...
[Deleted]
  Expert Advisor: I need help.  (19   1 2)
Hi guys, i´m a new coder and started programming a new ea. But i have a problem: My order doesn´t get send. The mt4 backtest says: invalid stoploss #130. I searched an found out, that i need to convert my signal. I want the Stoploss some points (variable) below the SuperTrend-Indicator. So look...
[Deleted]
Problem - I wish to keep my charts at M5, but every time at expiry they ALL change to M15 I've ask my broker but he doesn't know why its happening as well. Help  
how do I do can run two or more mt4 terminal program and I can use excel to recive data form this two mt4
int Crossed (double line1 , double line2){static int last_direction = 0;static int current_direction = 0;if(line1>line2)current_direction = 1; //upif(line1<line2)current_direction = 2; //downif(current_direction != last_direction) //changed{last_direction = current_direction;return...
I'm trying to come up with a real simple piece of code that just shows me the number of minutes / hours that I'm in an open position. Basically what I know I should do is use TimeCurrent()-OrderOpenTime()   But this gives me a Time formatted value from year 1970. I'd rather just have a number of...
hi, i was just wondering if there is a special way to get a trend line value (OBJ_TREND) for example trend line bar with shift=5 or should i use an afine function like y=ax+b ? edit : i didn't search enough. here is the solution double price=ObjectGetValueByShift("MyTrendLine#123", 11);
I build an Expert ,but it open a lot of orders at the same time. How can I make it to open just one order. please.     void OnTick()      {     int total=OrdersTotal();      for(int pos=0;pos<total;pos++)           if(OrderSelect(pos,SELECT_BY_POS,MODE_TRADES))      OrderProfit();      int...
I put this EA together as a starting point for those who wish to actually learn to program in MQL4. It is a simple Moving average cross EA that uses function calls, print and alert functions and other types of programming that i use when i program my EA's. It Prints all the Error codes and Trade...
I try to use CListView from standard lib. I add 3 lines, and give the x2 value of 1000 - to suffice the entire row. But not all the row is on the CListView - it is cut on the 54th position. Anyone can point the reason? Thanks in advance
any one know of a function that can tell if the server at the desk is Using US rules or not?
double ClosedPrice = 0;double ClosePrice=Close[0];//double GapinPips=0;datetime lastCloseTime = 0;int cnt = OrdersHistoryTotal();for (int i=0; i < cnt; i++){ if (!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue; if (OrderSymbol() == Symbol() && lastCloseTime < OrderCloseTime()) {...
Just messing around with code to get it right before implementing - this is to find the first trade of a particular type in the history pool. Code below + printed output. Does anybody know why it seems to think that GBPUSD is the same as EURUSD? void OnStart() { int Magic = 170715; for(int
[Deleted]
Two months ago, since the build 825, MT4 crashes my Windows XP Profesional SP2. I think it is doing a wrong operation which makes crash the graphical driver and then the os kernel also. No log, no memory dump, it's reboots instantly. My Asus computer is eight and half years old, and work perfectly...
[Deleted]
I realize a lot of experienced traders have high-end trading systems which can hold multiple charts and such. Before coming to the land of forex I traded options and even stocks at times. I've been strictly trading forex for the past 3 years (many highs and even more lows experienced)...do any of...
Hello there, I wanted to import a library for my expert with : #import "B:/drawer.dll"   int portotype();#import Here the result when I run the expert: Cannot load "B:\drawer.dll" [126] You can see that the file exist on the B: drive on the explorer. The DLL option on MT4 is checked. I have tried...
Hi,   I have this script that ran fine on a single currency trading EA. Now that I am trading with multiple currency, it is not working properly. I believe that the error is in the symbol selection. Can someone help me fix this simple bug? Many thanks    
Hi  I am new to MQL4 and have only been codding for about 1 Week. First of thank you for all the advice, I have learnt a lot from reading postis in this forum. I have been tying to code a EA and thus far I have managed to get it to a point where it uses custom indicators and based on the info it...
Hi all..   There are a way to detect if it's running normally or in Strategy Tester ? 
1: int start()2: { 3:4: if( code 1)5:   {6:7:    if (code 2) 8:     {9:      code 3;10:     code 4;11:     return(0);12:    }13:     14:   if (code 5) 15:    {16:    code 6;17:    code 7;18:    return (0);19:    }     return(0)     } Hello,    How can I loop back to int start() after line 12  if the...
[Deleted]
Hello, I have created some code to determine a lot size based on risk and stoploss. However, it seems to calculate correctly on regular accounts, but incorrectly on a micro account (such as Alpari-UK) by a factor of 10. Can anyone see how to modify the code to fix this (or perhaps confirm it does...