MQL4 and MetaTrader 4 - page 590

To post a new topic, please log in or register
  error 130 (1)
Hi all, So I've the EA running well on a ECN Broker without any error 130 return  but once running on a STP Broker the opening of orders is fine and when TrailingStop should "start is work" error  130 pops up. As far I understood ECN Broker runs on a commission base and STP on a spread base. Don't...
Hi guys, I'm having real trouble with the strategy tester - as far as I can tell it only takes the spread value at the beginning of testing and just uses that throughout. So if the spread is varying from the broker between 1-2 pips constantly (as it seems to be doing for me with oanda) my test...
Hi all, I've this issue occurring during the time that orders take to get closed; Say that I have 6 orders open and then the conditions to close all are in place, because the orders do not close at same time how can one avoid to get an opening to happen before all those 6 orders get closed ?...
Hi Coders,  what my custom indicator does is drawing trend lines, sometimes there are more than one displayed on the chart ( 15 is not an exception), other times there is none whatsoever. For this type of work, communication with an EA via iCustom is useless ( or better yet impossible) and I wonder...
Hi all, when the bool IsConnected()is false, the bool IsTradeAllowed()is also false? Is it possible that when IsConnected() is false, IsTradeAllowed() is true?   Thank you! 
Hi,  Very new to the trading game, I have started following the forex121 training system.  I have got MT4 running on my Mac using CrossOver.  However I have no idea on how to import the templates and indicators from forex121 on to MT4.  Does anyone have any tips.  Thanks 
Friends, greetings. I am kindly requesting a good samaritan to help me program an INITIAL STOPLOSS into the attached script. It would be great if it can be a 'stealth' / invisible to broker.  I have attached two files of the EA, one being mq4 format and the other txt. Thank you. Nathan.
I have 5 .Mq4 files for EA's which appear in MetEditor. 1.When I opened the MT4 platform Via the Desktop: Start/Computer/C Drive/Program(X86)/ MT4 Platform/experts, only 1 of the 5 .mq4 files appear there ?!,  But if I open the same folder Via Meta Editor: File/Open , C Drive/Program...
Here is the situation. I have placed many limit orders (limit sell and limit buy).   When I am not in front of my computer. The price may go in opposite direction as I predict. And it go pass certain point of price. I want my limit order to be closed, even it is not trigger yet. Can this be done in...
Hi there, I have been looking in the forum for a way to print the call stack to know which function called another function but I have not read anything related to that. I have a function called "processError" which takes care of error handling and it would be nice to be able to print where the...
Hi i ve got the following code   #include <stderror.mqh>#include <stdlib.mqh>#include <logfile.mq4>#property indicator_level1 0#property indicator_separate_window// --- parametersextern int history=180;int init()  {   log_open("testground.log");     return(0);  }int deinit()  {        log_close();...
Can one EA work with multiple currency pairs, using different input variables for different pairs? Or you need a different EA for each pair, with not just variables but the strategy optimized just for that pair? The answer is - it depends, of course. So I'm not looking for a yes/no answer but your...
  AE otomatis (3)
help me,, when the IA in the test went well in the strategy tester. why not work on a live account / demo ..?? thank
Hi guys, I'm trying to calculate my Preliminary Profit Factor for my EA, but I think I must be going wrong somewhere, because its coming out at less than 1.0, but the EA is profitable. My formula is:  PPF = (winning_percentage / (100 -  winning_percentage )) * (reward / risk) Now, I've just set...
I would like to create the position clearing price to be changed over time with "let's say the easiest" linear clear-position-price =a(time)+ b. Instead of setting the fixed position price as a clearing it, I want it to be time-variant. Is it possible? then How? Many thanks in advance ~  
Hi Guys, I'm looking for an EA or an Indicator that will send mail when a trade is closed with details such as the pair, P/L. I've been looking around for this but couldn't find anything. As of now, I use the MT4 ftp publisher which I access via the browser to check every hour. The MT4 default alert...
hi  how is it possible to get a current bar i, open & close time?  Thanks 
Is there an Expert Advisor for use with the Turtles Trading method? Thanks
Hi all, Does anyone know of any code (or an existing trade manager EA) which will handle partial closing of trades in the following way? Let's say you place a trade with 5 pips risk, when the trade is up by 15 pips (3 x initial_risk), I want to partially close enough of the trade to cover the...
Hello All, I have been trying to confirm or deny for the past couple of days whether or not hedging is available in the strategy tester. Several searches through the site have yet to yield an answer. I put together a simple EA that sometimes needs opposite direction trades open for the same pair,...
I imitate and wrote a same EA with the example in here https://www.mql5.com/en/articles/1510 except the conditions for buy/sell  Condition to open buy position : RSI below 5 AND Ask price above 200 Day moving average, exit when Ask price is above 5 day moving average. Condition to open sell position...
iMA and iRSI has shift parameter that we can use to find the values from past bars. MarketInfo() doesnt have  how can i find the closing price for Bid and Ask for the past bars? what function should i use?
I am new with FXXD MT4 platform I want to superimpose RSI with SMA and EMA moving averages on smae window outside the chart window How can I do it I also find that the APPLY does not have option of "Previous Indicator Data" to superimpose Please advise thanks for the help cheers
New article Forex VPS by Fozzy Inc. is published: VPS (Virtual Private Server) is a service whereby the user is provided with a so-called virtual private server. Virtual server emulates the operation of the standard physical server. This physical server has several virtual servers configured on it...
  Help with lines (24   1 2 3)
Hi all I am very new to MQL4 and hoping someone will feel sorry for me and tell me where I'm going wrong please... To start with I'm trying to draw two vertical solid red lines on a chart one at midnight and the other at seven in the morning.  When I run what I have written I get one at midnight and...
Hi guys, This one is a 2 part question (with sub-parts).  Part 1 1) First, regarding my EA, I want to know how I can make it open only 1-2 (verify criteria to determine how many) orders per bar and then discard the bar as verified. I was thinking of defining a variable e.g. barVerified (set at 0)...
Hi Coders,   suddnely my Print function stopped sending its outputs to a log file, though it keeps updating the Experts tab ( which is unusable for my analyses, however).  Did I uknowingly changed a switch, somewhere ..?
Hi guys, i tried to open a trade via EA as a marketorder. It should be a BUYING Order with a Stop Loss of 25 Pips and a Target of 25 Pips.       ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,Bid-0.0025,Bid+0.0025);      if(ticket<0)      {      Alert(Symbol(),": OrderSend failed with error #"...
Hi all, _I'm looking for a timer that close all open orders on Fridays by the end of market. Could anyone give a help here ? Thanks in advance. Luis 
My provider FxCast stopped trading on my(and on propably meny others) live account, without any messages. There is no answers for any questions for FxCast. Does Anybody know what the matter with FxCast please ? Can Anybody have idea how to continue? Help please!  Thank You for any answers. Bohem