MQL4 and MetaTrader 4 - page 709

Hi, suddenly after update yesterday the print out log is messed up, I'm getting rows of numbers on the far left, and now it won't even print out to log except for some of the lines Access violation read to 0x2456F000 Version 4 Build 711 sep 27 I didn't see too many solutions or explanations to these...
I have 2 different EA's running in same account on EUR/JPY. One strategy uses 5pips trailing stop, another 20 pips.  But when the trade on EURJPY is triggered    i get that smaller 5pips trailing stop on that trade where it should be 20 pips as Trailing stop uses select orders function to find the...
[Deleted]
Hello there,  I have already opened an account with one of the brokers. When I open a position, I can not see the order line as well as SL and TP line. I checked the properties and "show Trade Levels" option is already have check mark. Also my EA is not working at this platform. I am working with...
Hi Sir I am wondering if there is a way to code a MA indicator applied to another indicator, in this case I want to apply it to the results of an RSI indicator. At the MT4 platform, you can add a Moving Average to any indicator, just open the MA indicator and select the option - Apply to: Previos...
I am wanting to have a drop-down box on the parameter window of my EA that correspond to a string variable within OnInit() // --- Global ---enum Bias         {None = "None", H4_up = "H1 is up"};extern string     SELECT_maBIAS_ONINIT;extern Bias       MA_High_Bias = None;extern Bias...
  ADX Calculations  (2)
I am using the ADX parameter to evaluate the strength in trends over a series of timeframes. The goal being to identify situations where the trend strength in the current period, PERIOD_H1 below, is supported by trend strength in the longer timeframes, PERIOD_H2, and PERIOD_H4. When I debug the cose...
Hello,   Please can someone point me in the direction of MT4 server side administration tutorials or manuals etc.   Thanks    
I am writing an EA where I draw a horizontal line at a specific price level. This is similar to placing a S/L or T/P in MT4 where a line is drawn at the specific level or dragged from the transaction line to the specific price level. In MT4 you can also drag the existing line to a new position and...
hi everybody.. I'm working on a simple EA,. I realized that my SL & TP keep on changing after testing it on demo.. Initially, I set input parameters , SL =10 pips, TP = 10 pips..but it keep on changing and appear on a trade SL =9 pips, TP = 11 pips/ SL =8 pips, TP = 12 pips/ SL =11 pips, TP = 9
New article MQL5 Cookbook: Processing of the TradeTransaction Event has been published at mql5.com: In this article I would like to introduce one of the ways to control trade events using the means of MQL5. I must mention that a few articles have already been dedicated to this topic. "Processing of...
Hi experts, I've searched the forum but didn't find any topic relevant to my question so here goes. Is there a way in MQL4 to check how long a pending order has been sitting in the system and has not been executed? This is more of a sanity check for me to verify the expiration time set for pending...
Hello, I  have just created EA and want to incorporate trailing stop. EA will be launched  for several pairs which have different trailing stop levels. How it is the best way to write that trailing stop script into ea which will operate differently for each pair differently? Is it  good way to do it...
I found a great indicator that tracks the daily performance in real time of all the currency pairs on my list. Its a great indicator, unfortunately I can only see the first 10 pairs. It would be very helpful if the indicator can be sorted in ascending order and maybe another one in descending order...
Hello, how can I get the highest and lowest price for the last 50 bars ? I'm new at mql and have no idea. 
Hi, I'm stuck and would appreciate some assistance... I'm trying to use iCustom in a EA.  I have to supply a shift as the last parameter of iCustom but I don't want to look at bars I've already processed.  I tried using the following: void OnTick()  {      int...
I am writing an EA and want the EA to draw a horizontal line at a specific price level that is entered through an external variable. I have looked at using the function e.g. SetLevelStyle(0,1,clrBlack); but it seems to require a SetIndexBuffer which stipulates an array. In my case I want a line on...
Can I use them interchangeably for the current pair?
I noticed that mostly when MT4 get started, the Adobe Flash Player is broken and it can reproduce all time again. (No Sound, sometimes not play movies, settings not accessable and so on) (Tested under Windows 8.1 64Bit with that bug. Under Win7 i have not tested, but there is the Filestructure a bit...
As we can attach an indicator to the chart using iCustom function from EA, my question is how can we remove that same indicator from the chart using code inside the EA? Or any way to reload the indicator on the chart from the EA code?
When I drop an updated EA onto the given chart, it has no way of determining a bias from the historical price action. Instead, it will have to then wait for a bias to form off of the new price action. I am wanting to get the bias on initialization so that there is no lag or missing of setups when I
I can't remember how to do this, but this snippet of code here: ...        if( H1_close > ema60 && ema21 >= H1_low )            {            TriggerBar = iTime(NULL,low,1);             H1_Buy_Touch = "H1 Buy Touch";             }... All I am wanting is rather than "H1_Buy_Touch = "H1 Buy Touch";"...
Hi Guys I am trying to adjust my EA to a 5 digit broker but can't get it done. I am using this code (see SRC below) to convert my Digits to a 5 digit broker but when I compile the code I get the following errors '.' - semicolon expected pips - struct or class type expected I really don't know what...
  functions and function calls  (15   1 2)
Hi I'm noob alert ! Backround subject: I'm learning about the changes since build 600+ after a long lapse in learning mql4 At best I was only intermediate beginner back then. Anyhow, specifically functions and function calls. First Question: ref: https://book.mql4.com/programm/samples I assume I...
//+------------------------------------------------------------------+//| Expert tick function                                             |//+------------------------------------------------------------------+void OnTick() {  CheckHistory(); // This NEEDS to be checked every tick   if(...
Hi!   I have EA which has global variable [bool Trade=false;]. I need a function that would check if a line on chart has been crossed, it will enable trade [Trade=true;] , then 'wait' for 1 order to be opened (when trading conditions are met), and then disable the trade [Trade=false;]. Currently...
Testing Code and found OrderSelect(Ticket,SELECT_BY_TICKET,MODE_TRADES) does not change after selected ticket is closed. Anyone know the reason? extern int Ticket=0 ;//+------------------------------------------------------------------+//| expert initialization...
hello, my mt4 worked fine, but today after compiling my ea(during the tester was running), i cannot open the expert properties to modify the parameters( but i can still start the testing and generate results ) when i click the expert properties, the whole mt4 seems to freeze, i cant click any...
Hi, after I wasn't able to eliminate some differences I had closer look at iMaOnArray and I programmed a simple example. I created a buffer (sma(n)-sma(2n)) and let iMaOnArray create another sma(2) which I calculated my self too and displayed the result on the chart: 1) See the big difference of the
Hi all , I have searched this site without success , i need a function that will give me the values of the default Heiken Ashi candles on MT4 platform. I need help with getting the value of the white candle and the red candle ? I am currently working on an EA that will buy on white Heiken Ashi...
Hi, I am trying to connect the mt4 as a Socket-Client to a waiting Socket-Serve: I can see the Socket-Server waiting for connection in Windows SysInternalsSuits\TCPView. I am using the example from here: https://www.mql5.com/en/code/9296. I found that several things have to be changed as the types...