MQL4 and MetaTrader 4 - page 644

To post a new topic, please log in or register
  Help EA Code (1)
Hi mates, can help me with my code attached? It is a scalp with martingale. i need that EA buy and sell at same time, in other words, if he enter long and have a signal to short, he execute together. i have problems with magic number and trade management in mql code yet.. i am beginner in codes....
I have slight problems with digesting piece of code posted in Mql Book.: int start() // Special function start { int Dist_SL =10; // Preset SL (pt) int Dist_TP =3; // Preset TP (pt) double Prots=0...
Hello guys. After few days of testing I noticed that the indicator I developed was not working properly. It seems that MT4 already had the M1 timeframe data to feed the indicator, so everything seemed amazingly good in backtest, but when I used icustom to call the indicator into the EA the result...
Ok, let's say I have a ticket 1000011 which is long 2 contracts. I use OrderClose() to close 1 of those contracts leaving a position open of just one. Two questions - 1) Will the new position have the same ticket number? 2) Will calling OrderLots() on the original ticket show 2 or 1 lots in the...
the loop operator which is the faster? and what the tips to code a ea that can backtest/run faster ? my ea already do not use any technical indicators thanks
Hi, Does anyone know how to establish what the maximum allowable requests is per EA? Is this something that varies between brokers or is it a constant within MT? Also, does anyone know what constitutes a "request" i.e. is this only new orders and order modifications, or does this extend to other...
Ok, here is my game plan amigos. Lets say I just placed a (short) sell order and it loses. Next, the strategy wants to place a new order (or sell order) with a "break even" that recovers the last (short) sell order's loss. Example: (short) sell order closes with -$10.00 loss. Next, the strategy...
I use a indicator to calc index base on other period data, if the period chart is not open yet, iMAOnArray(...) will return incorect data, just as same as ArrayCopySeries, my question is: if I don't open a chart of the period, after the first calling return error, the flollowing calling...
Dear All, Kindly explain to me what are the main differences between the variables declared in the global scope of the program and GlobalVariable...()? Another question is jumping in my mind as per the following case ... I understood that, "Global variables of the client terminal are accessible...
Plug-in for MT4. Shows upcoming events and also shows past events anchored to price/date/time. Simple to setup for any timezone. Also simple to configure lead time for upcoming events. Data is presented intuitively to make it easy to digest, and does not clutter the chart like other economic...
Hi, I opened a demo account, set it $5000 and 1:50. Then I opened some position in realtime, it turned out $5000 and 1:50 are true. But in strategy tester mode(I want to use Visual Mode), how can I control? I find in "expert properties" I can set deposit $5000, but where can I set the leverage? now...
How do I use an existing template from within the program called? thx
I need to maintain the number of open market orders, and perhaps eventual pending orders as well, by each instrument symbol that are currently active and open. This needs to persist past each new tick and only gets altered when a specified symbol is closes and/or opens. I'm contemplating the usage...
I am running my own ea (which is .mp4 not .ex4) on couple charts. But every time I open strategy tester, the settings I set on every single chart go back to original setting. That makes me have to reset all of them again. That is painful!!! Any ideas to deal with my situation that will help me a lot...
Hi, I wrote a little M1-indicatior (here simplified): int start()   {  int limit,i, n=0, b=-1;  static datetime lstQts=0;   //---- last counted bar will be recounted   int counted_bars=IndicatorCounted();   if (counted_bars>0) counted_bars--;   if (TimeCurrent() - lstQts > 60) { // more than 60 sec...
hello everyone, I face another problem with Fractals, I want to draw support and resistance lines on fractals lower and upper levels, however.. it draws only when candle opens up.. and then price changes. Any chance to figure out how to draw on high and low prices of a fractal candle? Thanks...
MODIFIED AND MADE SOME CORRECTION, MAY BE YOU LIKE IT AND CAN HELP YOU, ALSO YOU NEED TO USE MA, BOILINGER BAND, ETC
Hi, I'm beginning to focus EA .. If I run my EA, you run the code in the function start ()? how often the program runs?
//execute alerts/trades on breakdouble tlprice=ObjectGetValueByShift("name", 0);double pricebreak = High[0];double pricelow = Low[1];if(pricebreak > tlprice && pricelow < tlprice){//Alert(Symbol(), " Long Breakout");OrderSend(Symbol(),OP_BUY,.10,Ask,30,Ask-250*Point,Ask+500*Point,"My order #2",777,0...
Hi, Does anyone have a Heiken Ashi (Not smoothed) EA they are willing to share? If anyone does, many - many - thanks. DaveFx
Hello there, I have another weird issue with MT4 b432. I have allowed dll calls but the platform keeps on telling me that "Dll calls are not allowed". Has anyone experienced the same problem? Any clues? Is there any "security mode" that disallows Dll calls no matter what? Thanks in advance.
Hello I need to know 'Are there Forex companies Allow hard and fast scalping with takeprofit 1 pip and spread 1 pip? Can someone earn money with EA open and close trades in just 2 or 3 seconds? Thanks
for(int i = 0 ; i < MACDLevel ; i ++)     {       if(iMACD(Symbol(), MathPow( 2, i) , 2, 4, 1, PRICE_CLOSE, MODE_MAIN, 0) <           iMACD(Symbol(), MathPow( 2, i), 2, 4, 1, PRICE_CLOSE, MODE_MAIN, 1) )         {           SellIndex += iMACD(Symbol(), MathPow( 2, i), 2, 4, 1, PRICE_CLOSE,...
//+------------------------------------------------------------------+ //| VoulumEa.mq4 | //| | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "" #property link "http://www.metaquotes.net"...
I've an ea using "buy and sell stop method" I think it's interesting. It works well to enter buy and sell order. but it does not take profits. i need a help to fix it by someone. I hope everybody to be happy in advance. I attach this ea as a text.
Hi all, In my EA I would to calculate fıbo levels automatıcly. I wrote the code below and altough I search a lot I coundn't fınd out how to determıne if it is a down trend or up trend. I appriciate if someone can help me regarding this. Thanks in advance. (I wrote "low bar is earlier" refers to the...
  set file (1)
Is there a way so that the specific set file name is displayed as a comment on charts that were optimised?
Hi, I want to import some functions from a dll. Therefore I had to include some *.h files. Is this possible, or do I have to write *.mqh instead of *.h? The dll if for a c-programming language. And there are functions with pointers and structs as datatyps. Is it possible to use that with mql4??
I am using a template with a large number of indicators. I notice that the indicators at the end of the list do not have their values shown in the data window in MT4. I have to delete indicators from the template in order to show the values for all indicators in the data window! Is there some...
Hello, It's a question about this forum. It seems that I am not aware when there are new answers on topics I have subscribe. Is my mistake ? Regards, Pierre8r