Download MetaTrader 5

MQL4 and MetaTrader 4 - page 867

To post a new topic, please log in or register
How could I remove an indicator from the window? Please...
Hi, I'd like to know how to do this. I tried to use OrderSend and on the lots input I wrote AccountBalance() / 200. But after 3 or 4 trades on backtesting appeared a bug, it bought the maximum lots it could buy. So what should I do for compounding?
Hi I am programming a Neural Network but I have the following problem: I run it once, and I get some results, then I run it again, with the same data and I get absolutely different results (in testing). It is apparently training over and over again and is not erasing the previous data (at least I...
Hello! I have a new bar function that I found on the internet. Here it is bool NewBar(){   static datetime lastbar = 0;   datetime curbar = Time[0];   if(lastbar!=curbar)   {      lastbar=curbar;      return (true);   }   else   {      return(false);   }}   It works very nicely except that it gives...
  alert once (5)
Does this code only check the Bid > Bands at the first tick of each bar? I want the alert to sound once but for the code to be checked on every tick during the bar:          // See if this bar is new         if (Time[0] > MostRecentBarStart)          {            // Store the time of the current bar...
Hi all, May I asked for a little help from those seniors here. I would prefer to trade with bar chart rather than candlestick chart. But the bar body (and its open and close little horizontal lines) in standard view is rather thin when I have to open 2 chart windows. I can zoom in the chart to make...
hello, in my ea I get error 130 on sending a pending order. I've checked Bid/Ask and price of the order but don't see any errors. For example: OrderType: OP_BUYSTOP Bid: 1.29915000 Ask: 1.29928000 Price: 1.30056000 (Is 0.00128 above the current Ask price) S/L: 1.29916000 (Is to close to Bid and...
  icustom query (8)
Hello, A non programmer here: Ive created a new EA template and I am trying to incorporate the iCustom function with multiple time frames. I have copied the all external variables from the custom indicator into the iCustom line . Below are the extern variables that appear in the indicator. extern...
Hi, I hope someone can help me with my problem. I'm trying to create an EA which only open max 2 positions per day. Let say the trade is triggered by MA Cross and I only want the EA open max 2 positionper day. Which one is the best technic? Using GlobalVariable or checking history ? Or isthere...
Hello, I wish to suggest the consideration of language selection option in the installation of our popular platform MT4. This is because one may only use one language at a time and therefore inclusion of all the languages in the package only contributes to bandwidth consumption. Since I use English,...
This keeps happening, usually when there are many orders - and usually while I'm sleeping or away. It's happening at 2 different brokers. The brokers told me to reinstall the platform, which I did. Still happens. There has been a critical error Time : 2010.06.01 21:36 Program :...
U sing Alpari MT4 and I was updating the database at History Center. I found that there are some missing data in the database such as provided below; USDCAD:5/8~7/12 were missing EURCAD:5/8~7/11 were missing EURUSD:5/8~7/18 were missing USDCHF:5/8~7/18 were missing EURJPY:5/8~7/18 were missing I...
Will be made Linux version of Meta Trader whenever ?
Hi I would need some help with my code. I have stripped it to the bare minimum and posted it below. Basically the code below says when 12EMA crosses above 26EMA and if the current price is above the closing price of Bar[1]+30pips, i would enter into a long order for 2 lots. I will then close 1 lot...
I call the pivot point moving average system the Defcon III system; its de sign was based mostly on pivot point theory. First, I use the pivot point moving average to help filter the projected support and resistance levels based on the closing price in relationship to the actual pivot point [(High +...
Can I create objects that appear behind the chart price? I'd like to reduce the likelihood that I accidentally select the objects. Does putting them behind the price, if it's possible, help reduce accidental highlighting?
I want to compare 2 indicator values in an EA if they fall within X minutes of each other. As an example, comparing when a Schaff Trend Indicator line turns vertical with the move of another type of indicator if they are within x many minutes of each other. How could this be accomplished?
Hello, I am trying to write this line into my EA to set a stop loss, but i don't understand the calculation... {SL=Low[i]-(MarginPips+StopLoss)*Point; SL is the Stop loss to be used in the trade, MarginPips is an input parameter aswell as StopLoss, but i dont have a clue what Point is! Its not an...
I hope you can help me understanding why the backtester does not use the whole available historical data? My system works on the German 30 (DAX). In order to have a lot of historical data, I downloaded and converted the data from Yahoo Finance: http://finance.yahoo.com/q/hp?s=^GDAXI The System I am...
I tried adding this code to stop the alerts from sounding continuiously. They should only sound once for each candle. If a new candle starts, then it should be reset and allowed to sound again. Any ideas on what is wrong with the code? // Store the start time of the most recent bar which has been...
Is there a possibility to start a backtest from the command line? Something like "terminal.exe -tester EAxyz EURUSD 5min 2000.01.01 2010.01.01" ? Any other idea, how I could start a backtest from outside? I want to use external programs that start different backtests automaticaly. But I have not...
in my EA some time error 129 (invalid price) is coming how to overcome it when i am taking 2 orders at a time for one order it is getting this error how to overcome from this problem can any one help me in this regard
I have some code to work out the average amount of pips that price exceeds a 2 period LWMA on my chart. Someone advised me it had to be worked out using the moving average but shouldn't it be using all the candles on the chart? So, if price exceeds the LWMA, I increase the count to work out the...
Hi all, When I make 2 (ordersend) after eatch other, the second order return -1 I put a while around the second order, but stil, many -1 results, but as soon as I recompile the order get sendt, and no problem! while (ticket2 < 0){ ticket2=OrderSend(Symbol(),OP_SELL,0.05,Bid,5...
I'm trying to draw a linear regression channel in an EA I'm working on. The two points I want to use are: T1 - beginning of the calendar day i.e. 0:00 T2 - 8:00 am on the same day. However I want the T2 of the channel to constantly update with each new bar forming (that is on the M15 time-frame)...
i want to make a dll,it works independently from its caller . it is triggered by a Timer,there should be a procedure that do something and get an initial data. there should be a function and calculate the data and export the result . my thoughts as follow, but the code does not work,will someone...
New article The Optimal Method for Calculation of Total Position Volume by Specified Magic Number is published at mql5.com: The problem of calculation of total position volume of the specified symbol and magic number is considered in this article. The proposed method requests only the minimum...
Hi all, what is the API to use in order to call an external application (e.g. app.exe) inside an EA? Thanks.
Hi, Could anyone please help me to understand the use of buffers. I need to create two upper bands and two lower bands around a simple MA. I used ienvelopes, but the deviation is in percent. I need to use a point value. Here is a sample; double BotBand1 = NormalizeDouble(iEnvelopes(NULL,0...
Hi All Need help if possible to get the price value of Fibonacci level 4, as an example in my case. i tried using double vSell = NormalizeDouble(ObjectGetValueByShift("SELL",OBJPROP_FIRSTLEVEL+4),Digits);Ticket=OrderSend(Symbol(),OP_SELLSTOP,ILots,vSell,Slippage,(vSLS),TP,EAName,Magic...