MQL4 and MetaTrader 4 - page 69

To post a new topic, please log in or register
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, I have been trying to put together my first self made EA I ahve been able to solve the 1st issue with stochastic now its the candle wick length. I want to instruct the EA to only take trades when the upper wick is greater than or equal to 20pips for a sell and the lower wick is greater than or...
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?
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, I'm kinda' new to using Scripts, and am running into a problem. Using the standard (or any other) scripts on my InterbankFX demo account worksfine, but I recently set up a live acount and whenever I try to execute a scriptI get an error message in the Expert Log that gives number 4109 - which...
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...
  Digital Martingale EA (110   1 2 3 4 5 ... 10 11)
This is the first of hopefully many different versions of Ea's using Mladen's digital indicators plan on making martingale Ea's and regular Ea's using these indicators. The indicator is the same as Digital filters smooth -separate, but removed the mtf because to me makes it easier to code the mtf...
Hello, does anyone has script for calculate today profit/loss? i have find everywhere but couldnt get one. help me please. thx code in mq4 would be very appreciate. thx
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...
Hi, If I want to use the same signal on two different broker accounts, do I need to subscribe twice to the signal? Thanks for your help.
Hello, I am backtesting to see whether my understanding in time is correct in MT4. So I started backtesting with Tick data suite an EA called robotron using different timezones, but with same default setting. The only difference is the trading time is adjusted to the timezones respectively. I tested...
everytime i start the mt4 terminal ,there will apear a process named "DJ音乐盒 " in task manager .it use many memory resouce. when close mt4 terminal  the process disappears too. when teminate the process ,the mt4  teminal disappear too. i reload the windows oprate system several times ,the problem...
Hello, EA code is to open Buy Limit order if Open Buy Orders > 0.And close any Limit order when Open Buy Orders = 0 It does but it closes it after seconds and repeats this How could we fix this? Thanks in advance! Code: int count_sellLIMITorder()  {   int countsellLIMIT=0;   for(int...