MQL4 and MetaTrader 4 - page 1166

Hello, I am developing an EA and I want the buy order to be as follows: Buy signal triggers when candle closed below moving average and above another moving average and also the previous candle ( would be 2 candles back)closed above a moving average. Signal triggers when candle opens. Can someone...
HI, ik got a double variable named bebuy which has the number 10 in it. I want to use the following to modify the stoploss, but somehow instead of Ask-bebuy(=Ask-10 pips), it puts the SL maybe 200 pips lower? I believe i use something wrong in the syntax, but can't see it. Who can help me with this?...
Hello, This is my first post. I have been reading these forums for a while in order to gain some insight on mql4 programming. My earlier programming experience was in C++ and VBA (if you want to call that a programming language). I'm glad that mql is so similar to C++, certainly makes things a...
[Deleted]
Hi, When using my MT4 this weekend I received the LiveUpdate pop-up message to update to build 402 (am currently on 401). I selected to update and the update went thru and then asked if it could restart my MT4. I selected Yes and then my MT4 would not open. I even later tried start my MT4 via the...
I want to use Heiken Ashi Real (attached) in my ea via iCustom double p1.val=iCustom(pair1, chart.time.frame, "Heiken Ashi Real",13,1,0); How do I get the value of the white line, and the red line? I want to be able to compare the 2 in my ea... ie; if(white line < red line) signal is...
today i got a message - trade - manifest error 324656 with -£70.00 anyone tell me what this means
  kernel32.dll  (2)
Hello freinds, I need the KEERNEL32.DLL fiile. Can somebody attach it? Thanks, Y.
I'm encountering some EAs where each currency pair is assigned a unique number. In one case I moved them to a included file CurrencyPairs.mqh (attached) so that some brokers that utilize unique subfixes such as EURUSDiam. This file can readily have other unique definitions added to it to avoid...
[Deleted]
I just wanted to hear your opinion about these two options since I've read several threads discussing the superiority of the one over the other and I'm not sure which method I should use. Is there a better choice at all or is it a matter of taste?
[Deleted]
Hello again, MetaTrader operates on the Tick. My EA should start analysing Trade signals when the Zero bar closes and becomes bar 1. So it analyses only 1 time and not on each tick. I'm wondering if there is a command that controls this situation. Anybody has an idea ? Thanks
[Deleted]
Hi! Since last week i've been trying to develop an indicator to tell me when to enter/close trades, to give an idea of how much profit /loss the trade was and the total profit of all trades. So far I not doing bad but i have some issues. Here's the script:...
  Cool system!  (474   1 2 3 4 5 ... 47 48)
This is amazing!!! Out of 10 trades 8 are profitable. Can you tell me how to insert the data of these indices into the EA
[Deleted]
extern double RiskMM=0.02;...... int init(){ ...... double InitialBalance=AccountBalance();} int start(){double CurrentRisk = InitialBalance- AccountEquity();          CurrentRisk=CurrentRisk/InitialBalance;         if(CurrentRisk>=Risk) {.....CloseAll(); return(-1); } ............return(0); }
MetaQuotes Software Corp. announces placing a downloadable version of Sergey Kovalyov’s book Programming in Algorithmic Language MQL4 on the website of MQL4.community. The book is published in the Windows Help File (CHM) format, and it can be downloaded to be studied offline. As its title suggests,...
Hi I need some help, please. I'm trying do write a script reading an input file creating an otput one. My problem is: 1) I have a WHILE loop to read the input file 2) FOR each record it must do some processing a write an output 3) When the FOR is not in the script ALL the commands are executed 4)...
[Deleted]
Hi, I am now studying this EA provided in CodeBase, https://www.mql5.com/en/code/10306 but unfortunately, I can not find these three header files: #include <BasicH.mqh> #include <OrderLibE.mqh> #include <OrderLibH.mqh> can anyone tell me where comes from these header files? are they provided by...
Hi guys, I got a recommendation for a 'Strategy Trader' trading platform. Did anyone try that 'Strategy Trader'? Does it has any superiority's over MT4? Thanks, James
hello! my ea open pending order and modify open price pending order(just open price pending order).i need a code when my ea have signal(for example when ma have signal). stop modify pending order and dont modify until open new pending order. please help me i realy need it. thnx.
I am busy creating my first EA and had the following results: Total net profit 169356.07 Gross profit 735527.38 Gross loss -566171.31 Profit factor 1.30 Expected payoff 1459.97 How is the "Expected Payoff" calculated? Which is more important: The Profit Factor or the Expected Payoff
Is there a simple way of retrieving if a previously closed order closed via Take Profit or Stop Loss? At present I am retrieving price data and comparing closing price with stop loss and take profit to infer if that was the case. thanks
[Deleted]
Helllo everyone I use MT4 but i can`t draw Fibo Arcs. I don`t know where must be my 2 points? ie.one low and one high? I don`t know what must be my scale and what`s our criteria in determining the scale
[Deleted]
I'd like to confirm my trade lot, and use code as follow: double LotsOptimized()  {   double lot;//=Lots;   int    orders=HistoryTotal();     // history orders total   int    losses=0,wins=0;     int    b,c;   b=iATR(NULL,0,233,0);    c=AccountLeverage();               // number of losses orders...
We have a large EA that has worked fine for the past year without concern for build versions of MT4. As of build 399, an EX4 compiled in 399 crashes the terminal when run in 229, but a recompile of the identical source under 229 works fine. Are there known issues involved here? This could become...
[Deleted]
please can any one know to integrate mql4 Language with vb.net
-
Hi there, I am trying to open a csv file and add some information to the end of it. I use for example: string filename="test.csv"; int Handle=FileOpen(filename,FILE_CSV|FILE_WRITE,';'); to open a csv file and: string date=TimeToStr(TimeLocal(),TIME_DATE); string time=TimeToStr(TimeLocal()...
  ea issue  (6)
I've programmed an ea which should do ok on EUR/USD ( backtested from 2000 - 2010 ) http://img851.imageshack.us/img851/6564/12314.jpg but failes on all other pairs should I throw it away ?
Hi Guys, I created an EA but TrailStop() function cannbe be executed in the main fuction. I checked several times but couldn't find out the bug. Could you help me debug it? Thanks... My thread is simple. No profit target set when sending out an order and trigger TrailStop() when getting 40 pips...
"Don't try to anticipate the market, follow the price!" When you read that, it makes you feel like a sheep. It is so easy to follow the price and take profits, while you make some predictions and suffer losses. Can someone explain this principle? I've always assumed that opening a position is based
Dear all i have a problem in stop loss its not working, i need help in correcting it thanks in advanced OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+Step*Point,3,Ask+(Step-SL)*Point,Ask+(Step+TP)*Point,"",12321,0,Green);  OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-Step*Point,3,Bid-(Step+SL)*Point...
[Deleted]
Hi, maybe it is basic knowledge but why is it that the MetaTrader backtester overrides the timeframesettings I assigned to my variables? For example: I want the EA to buy after an engulfing candle pattern has formed on a 5 min chart, so I declare the variables for iClose and iOpen and set them to...