MQL4 and MetaTrader 4 - page 461

Hello everyone, I am very confused about what exactly swap means. I found this bit on Google   "A swap/rollover fee is charged when you keep a position open overnight. A forex swap is the interest rate differential between the two currencies of the pair you are trading, and it is calculated...
Hi All I have an OrderSend working on previous Hour Candle at 06:00 Problem i have is that OrderSend is using the last 06:00 which is one day ago? Anyone able to point me in the right direction to read documentation how to fix. Look forward to any replies. Merry Christmas. J
Hello everyone, I have two demo accounts at the moment in which I test my EA's.  I don't want both the EA's to be capable of being enabled on both accounts. Can I use a conditional compilation to prevent this from happening? If it possible, please elaborate on steps to achieve this.
  Help for developers.  (181   1 2 3 4 5 ... 18 19)
Having an unconventional approach and a desire to do something good for people I've been in touch with for years, I decided to create a thread where I would try to help developers find solutions to their problems. As practice has shown, I have repeatedly found effective solutions to other
Hello everyone, I would like my EA to close the orders at CROSSING moving averages, simply. But I can not find the "formula" that can perform this function. However, I tried a lot of solutions, such as: if (Ask <= (ma5 (1) <ma8 (1) && ma5 (0)> ma8 (0))) ..... CloseAll (); etc ... and many others,...
  pip-based timeframe  (14   1 2)
how would you code a chart that is based on pips and not on time, but on pips: acandle closes when you've had 10 pips up or 10 pips down. So candles(/bars) arebased on price and not on time. Doesn't seem like a simple coding thing so anyhelp would be much appreciated
Does anyone know how to get a second 'Fibobacci Retracement' tool, into the MT4 Tool bar. I have changed my Fib tool to draw 'Entry, Stop Loss and Take profit'. However it is slow process to convert the Fib tool back to its proper use. If I could have a second Fib tool, I could leave it with the...
  Arrow Spacing  (3)
Hi All, Can anyone tell me how to space out arrows so they aren't directly on the top/bottom of a candle? Below is my source code along with a screenshot attached of how they currently look. #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property
Hi everyone, Why does ObjectFind() never find my object?? Thanks! #property strictdouble t_SL[1];int OnInit()  {   t_SL[0]= Bid;     ObjectCreate("t_SL"+IntegerToString(0),OBJ_HLINE,0,0,t_SL[0]);   ObjectSet("t_SL"+IntegerToString(0),OBJPROP_PRICE1,t_SL[0]);...
I'm working on a MA cross over EA and adding features here and there. One thing I have been trying to do is detect events where the moving averages cross while a bar is open, then uncross before bar close -- a fakeout. I am having a lot of trouble trying to figure out how to detect these events...
Hello, I have a problem which is quite simple but drives me crazy : i'm trying to calculate Profits shown in my Backtest (USD) with the amounts of pips and the lot , here's the formula pips * lots * (MarketInfo(pair, MODE_TICKVALUE)/ MarketInfo(pair, MODE_TICKSIZE)) the values are : 0.0030 points...
  Chart Clones  (38   1 2 3 4)
This indicator will draw price charts as a subwindow. It has some MT limitations which I could not over come. One is the drawing or rather the sizing of the candles donot stay in step with the MT charts This indicator was writen to work with the charts as I look at charts. If you like to look at...
Hi all,  I've written some "if" functions that delete a stop_order if the price goes past the high/low of the applicable candle in these three bar signals. However, if you take a look at the screen shot below, the sellstop  order at 1.11737 has deleted incorrectly just before it would have entered...
Hi all, I created a simple indicator as the difference between the Stoch(5.3.3) and his signal line. //---- indicator settings#property  indicator_separate_window#property  indicator_buffers 1#property  indicator_color1  PowderBlue#property  indicator_width1  2//---- indicator...
Hello, please can someone help me? Am just new in coding .. I tried to Modify 2 open orders at the same time,(I have 2 tickets with different Magic, one is for buy and one for sell), but order select dont work for me Errors like: invalid ticket for OrderModify function Modify of Buy cant be succees,...
Hello, I'm attempting to get my advisor to draws its technical analysis on the chart in real time. When I use ObjectSet to change parameters that would otherwise change the shape and size of the object, the changes are not being updated on the chart. In the code that draws prices from the technical...
Hi guys and girls, So I've heard that the strategy tester in MT4 is a little bit wholly inaccurate. Does anyone have any tips on how to make it less so? For instance commands to avoid and what commands to use instead. I've been doing forward testing using multiple accounts and different parameters,...
  Panel hidden  (3)
Hello, i have a panel that is suppose to display like this: When i minimize the chart and move the panel, some of its content gets hidden.  // Create Trade Panel   if(!TradePanel.Create(0,"tt",0,X_START,Y_START,X_SIZE,Y_SIZE))     {      return (INIT_FAILED);     } So i have been trying to solve...
Hi, I'm trying to make a clean price intersection expert advisor with no success till now, I think the code is right but the backtester doesn't think the same. These are the critical points: - Opening candle price below the moving average and close price upwards for BUY:    double...
I am having some problems with EAs and MT4. 1: When I start up MT4 I get the error "Error News download, add the address xxx in the list of allowed URLs on tab Expert Advisors". How can I remove this news function or find the faulty EA that's causing this? 2: I wanted to test some EAs with my demo...
is it possible to use a downloaded indicator when programming my experts?
  HELP FOR CODE EA  (6)
hi i am a beginner of MQL4 code, help .... code of OP_BUY for CCI cross a value (not when it is greater). example, bar [1] CCI = 57 at the closing of bar [0] reaches the value CCI = 68, so the ea must open the position size. In the usual logic, how can I take past values from an indicator? example I
  Mql4  (1)
can I use the average directional index wilder indicator to create programs on mql4 ???
  MT4/EA  (1)
Hi,I would like to know why this happens on my MT4 I leave my MT4 open overnight with my EA on but for some reason my EA doesn't place trades regularly on my Journal say's ping failure
Hi all Have an ea that works perfectly on regular accounts but generates 4109--"Trade-not allowed" error when micro account requires symbol with "m" added, as in header. Does anyone know of a work around? Have confirmed that live trade is checked ; unfortunately the broker is in denial mode and I
Hi All,    I am new to mt4 programming. I am using two moving averages 50 and 200. Can some help me out by giving me mt4 code to print close price of the particular candle where the moving averages cross each other. Also i wish to print the close price  above the same candle itself.    It will be...
  FileReadArray() HELP!!!!  (11   1 2)
Hello! Hope you can help me out. I have a file named "sample.bin" in the MQL4/Files directory that has the exact following content: 1 0 1 1 0 1 I want to create an array that has all of those 6 lines as array values. The desired output is array[1]=1      // (as per the first line of the sample.bin...
Hi everyone, 1) Is it possible to drag and drop the SL & TP without having to press teh ALT key? §If yes, how? 2) I have a UHD monitor and the SL/TP/Entry price lines are much too thin. How can I increase their width? Thanks!
Just a discussion point;  1. do you go for a set take profit target for every trade, say 100pips regardless of your stop loss size, or 2. do you make your take profit level a set ratio larger than your stop loss for each trade, i.e. Risk reward ratio of 1 to 3.. Reason I ask is I had the EA I'm...
Hello, I wonder if it is possible to know which window is the active one, the one that has the top priority for mouse clicks Or get the name or anything specific about the top active window? I've tested all these functions and more but they usually return 0 : int      GetWindow(int hWnd,int...