MQL4 and MetaTrader 4 - page 804

To post a new topic, please log in or register
I try to use these code to manage my money,but an problem is I don't know how to descirbe my initital money(priniciple) .my method is cotrol lot :use priniciple 's maximumrisk+3 times about of profit(or loss)'s maximunrisk as lot,it profit>0,it will enlarge,otherwise,the vise. double...
l found this EA on this site which l so much like,(sell_buy agr _EA)these l would like that you modify with some other features like:- 1.not just buy/sell routine as the present EA was,But it should study the trend,if its a buy, buy trade or buy, sell trade or sell sell trade or sell buy trade...
//+------------------------------------------------------------------+ //| send_pending.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ |...
Hello, I have an EA that not work on Oanda MT4, but it is working on Alpari, EA is on at the platform etc.. so it must work. Any idea? many many thanks. #property copyright "Tous droits réservés, Nicolas Tuffier (2011)" #property link "http://www.furyweb.fr/forex/" #import "stdlib.ex4"...
Hi, I am trying to test a strategy in SP500 index. after openning the first order (sell) the tester is closing the possition Immediately and close the testing session. where can i get the reason for this action? in the log file I see the following: 11:24:54 2001.12.12 00:00 MarketLib _SP500,Daily:...
Hi all, I want to build a dll to send indicators values and prices to excel, process them in excell and send back orders to mt4 (I want short response rates). My question is related to the big concept of sending receiving data. Should I use c++ to build the dll? Many posts mention that c++ works...
Hello MQL Community. I am a really new user of the MetaTrader and MQL4. I have been following the tutorial when I came across this problem. Data provided by Pastebin.com - Download Raw //+------------------------------------------------------------------+ //|...
Hello, Iam new in programing EA, i need help in order to verify my EA According to EA which i build on :EAB site web http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ EA open buy if indicator above 0.5 and closeopenbuy below 0.5 line EA open sell if indicator is below and close after close buy...
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...
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...
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?
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
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:...
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)...
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...
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
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
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...