Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1179

To post a new topic, please log in or register
How to find total number of symbols traded. eg. I am trading buy and sell GBPUSD, EURUSD, EURJPY and USDJPY and I want this to return total of 4 pairs traded. Anyone know?
  A real puzzle (1)
Hi: how to make a indicator without the function Bars? for example:I want to make a indicator (Macd),use the newest 1000 bars, so don't want to use the Bars,and the Indicatorcounted(), could you give me an example? Thanks
How does the "every tick" method work in the strategy tester? If I have an order like this: price-StopLoss-TakeProfit 1.5000-1.4995-1.5005 and the bar after I place the trade looks like: Low-High 1.4990-1.5010 Does the startegy tester count this as a gain or a loss?
Is there an example of how to call the AccountProfit function in an indicator anywhere as I can't find it? Yes I am a frustrated NEWBIE ! How can this be so DIFFICULT ?
Hi all, After months of testing with demo account, I just started my expert in a live account. For my surprise it just started to open orders incorrecty, I guess that the problem is with the history data (it was empty and some of my calculations gave false results). So I decied to alter the option...
if u have got this error via GetLastError() then how you handle it? // (functions of OrderSend(), OrderClose, OrderCloseBy, OrderDelete or OrderModify) // can fail, for a number of reasons, and return either negative ticket number or FALSE. // One can find out about the reason for fail by calling of...
hi in my EA, I try to print my two variables but it's not working: ********************************************************** double m_10 = iMA(NULL, 0, 10, 0, MODE_SMA, PRICE_CLOSE, Current + 0); double m_20 = iMA(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE, Current + 0); for(int i=1;...
Re: moving average expert advisor sample supplied with mql4 LotsOptimized () is used in OrderSend functions but not defined as to how to calculate LotsOptimized is not in the help dictionary What am I missing? I am not sure why the file compiles without error. Rudy double LotsOptimized() {...
I tested the COM dlls and the ACTIVEX DLLs,failed! and i am now testing dlls made by the VC++? can sombody tell what kind of DLLs can be imported into the MQL? which IDE shoud i use to make this dlls? thanks!
Hi to all, this is my first topic and post and I'm here because I'm learning. I have a question for the community hoping that you can help me. I've created an EA that when receive signals, should open some position. For example, if I receive a signal of BUY on EUR/USD, my EA should open 3 orders...
Hi, I am not receiving any emails either from the forum, i.e. the threads I subscribed to, or the newsletter. Did you disable the feature? Sincerely, Daniel.
Older than 2008. Where can I find it and are there easy to follow directions for a non programmer? douglasjmorgans@yahoo.com
Hello, I'v sent data to a file through the following code, int deinit() { //---- int handle; string name = AccountNumber()+Symbol(); handle=FileOpen(name, FILE_CSV|FILE_WRITE, ';'); if(handle>0) { FileWrite(handle, l, s, InitialShort); FileClose(handle); }...
New article Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Cont.) is published: In this article the author continues to analyze implementationalgorithms of simplest trading systems and introduces recording ofoptimization results in backtesting into one...
  Holy grail exists? (14   1 2)
Hello all, I am a beginner in MQL, but I just have one question to start. Is there such thing as profitable EA, aka Holy Grail ? I am trying to find some motivations before starting to work on it.
Hi, Please help me to find out why these codes get "too many opened files" error. ...     for (Counter=0;Counter<OrdersTotal();Counter++)     { OrderSelect(Counter, SELECT_BY_POS, MODE_TRADES);       if (OrderOpenTime()>New_Order_Time)        {...
Hi there, I'm having trouble with my EA while live testing. I've placed an EA on a demo account for live testing. The thing is that I had to change a couple of things in it while the EA was working and when I compiled it the EA ignored the existing data. For ie I had 5 pending orders and 5 was the...
  Common Expert (3)
i have a 4 metatrader Platfrom(sample fxdd,fxcm...). i want to common directory (expert,script,indikator ...). How do common directory. example 1. programfiles\fxdd\expert 2. programfiles\fxcm\expert 3. programfiles\interbankfx\expert i wan to a expert path programfiles\commonexpert...
Hello, I am looking for some help to fix an indicator. Basically the problem I have is that the "Fisher" indicator onthe bottom of the attached zip file does not update very well when it is left to run. If you switch to another chart timeframe then go back it updates the Indicator all right. All the...
Hello, Can someone tell me how can I export historical data from Meta Trader 4 to a file? I just need a simple script/function that get a symbol-name, timeframe, start-date, end-date and outputs the data to a new file in some readable format. Thanks
I know this is a stupid question, but I'm really new at this. I apologize in advance for being dumb. My automatic trading program issued a buy about two hours before the broker closed down for the weekend (at least I think that's what happened). Do I have to keep my computer on all weekend with...
Can someone tell me how to code for a certain start time for placing orders, but not have stop time for closing. I want to stop out only at profit target, or stop loss, Thanks
  ru translate (3)
mainLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_MAIN,a); prevMainLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_MAIN,a+1); signalLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,a); prevSignalLine=iStochastic(0,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,a+1); if(prevMainLine<prevSignalLine...
Hello, Friends, I accidentally (don't know how) deleted the Alligator indicator and can't figure out how to get it back. Can you help me? Thanks . . . dragonmom
Hi All I have an expert which reads data from a external file and executes trades based on the information inside this file, I don't want my expert to open and read this file on every tick. does anyone know how to use any windows DLL ( likes shell32.dll or kernel32.dll) to query the last...
Hi, I found one very nice indicator on the Internet. However I have no .mq4 sources of it, so I don't know exectly how it calculates the data... I want to write EA, which will trade according to this indicator. How can I access the data of the indicator from source code of my AE? To answer my...
Does someone know where I can get code to add an expiration date to my EA? Thanks.
Hi Every One Please I need set of codes to be used in a script that will place multiple orders
Would anyone know if there is any existing script/EA which can enter a batch of 'at market' orders all in one go? As the 16 crosses do not change there would only be 2 variables per symbol - * long/short * order size (which may be the same for all symbols) Doing this by hand takes forever! Any...
Dear MQL4 Admin, I have plan to write a book for MT4 and MQL4 tutorial in Indonesian and publish it in my country. The content will be : 1. How to use MetaTrader4, with pictures. 2. How to create an Indicator, Script and Expert Advisor. 3. Reference - MQL4 Functions. I can guarantee that the content...