MQL4 and MetaTrader 4 - page 571

[Deleted]
Hello guys,  I am newbie here. I feel like this script should be very easy, but i don't get it why it don't work.  I want to write script which would give me open price of exact time. Let's say i start script 8:00 and i want that at 13:00 it would give me open price of bar at 13:00.  It's part of my...
[Deleted]
In the documentation I can read that Buy-Orders are opened with the Ask price and  Sell-Orders are opened with the Bid-price. When you close the order you must take the oposite.   In my demo account I can start and close orders with Ask and Bid price. I can mix it. It functioned - I get no error...
  DaysOfMonth() question  (12   1 2)
if(Month()==1 && DaysOfMonth() == 30 || DaysOfMonth() == 31) return(0); can I use DaysOfMonth() like above?
hello everyone, I have created a true / false filter, if it is active is ok, but does not work if disabled. extern bool   FilterHistogram      = true; // Declare filter&& (FilterHistogram)&& iCustom(NULL, PERIOD_CURRENT, "Awesome", 0, 1+i) < 0.000010  // Condition  
it's possible to open a profile in mt4 when i click on a button created on my chart? i found how to open a chart with the function ChartOpen(), but i need to open a profile this is my code to open a chart on button click void OnChartEvent(const int id,                  const long &lparam...
Hi guys, I have a problem with this code and I can not understand why it does not work. It gives no errors, but only returns the value of TF 5 minutes while the 15 minutes does not appear. Thank you all, Massimo. #property...
I enter the condition in the candle 2 if Red or Green with I cover more than 0.2 pips I have this error : check operator precedence for possible error; use parentheses to clarify precedenc help me solve please? &&(Open[ 2 +i] < Close[ 2 +i] && MathAbs (Close[ 2 +i]-Open[ 2 +i]) > 0.2 * myPoint ||
Hello everybody, I'm looking for a solution to write to a csv file, all the signals of my indicator. When I get a signal,  write the result to a csv file, for a Sell if the candle closes Red I will have a result 1 else 0, for a buy signal if the candle closes Green will have a result 1 else 0. //---...
Hello, i attached an indicator i very like: RSI/RSX TripleHull unfortunatlly i found an error, somethimes there is a zero devide, first encountered with Period 50, but  it seem it can reproduce with any period (see screenshot). Can anyone fix this ? (Mladen  ? :-) ) by the way: is it possible to...
Hi guys, I have a serious problem and I don't think I could handle it myself without any help :(. I would be very grateful if someone could give me even something to read because I don't know where to start... I'm writing a MQL4 indicator and I stuck on one case. What I need to do, in the first...
hi wi would open a eurusd mt4 chart when a click a button, this is my code that show a button, when i click it, it's does not open any chart of eurusd, where is my error? #define WM_COMMAND 0x0111 string eurusdButton = "eurusdButton" ; int OnInit () { ObjectCreate ( 0 ,eurusdButton, OBJ_BUTTON
From the diaries of the world's worst programmer So I'm learning about arrays but not being very bright, struggling to understand how they actually populate themselves and how that affects memory allocation and resources. I'm trying to build my own currency strength indicator. First step, build an...
[Deleted]
Hi there, Is there a limitation in MQL4 to write a FOR operator inside another FOR operator, aka nested operators? I'm analyzing 2 variables and to my understanding the "internal" FOR - on each iteration - should keep the external FOR's variable unchanged. However I'm getting erratic results as the...
Hi, imhaving a small problem with developing a code to determine the ‘x’ value whichis the index of the bar on the 5 minute chart with a range of 50 pips or more  between bar 1 and bar 8640. The Code keeps onreturning a value of 1 even when the range of the bar with an index of 1 isless than 50 pips...
  Continuos line  (5)
Hi guys, I have a simple question: how do I get this: //——————————————————————————————| fine del programma |————————————————————————————————| instead of this? //------------------------------| fine del programma |----------------------------------| Thank you all for your cooperation
Hi all, I can't load some EA into my charts? I got th following message error: refer picture attached. I tried to copy paste the code into a new file, then saved and compiled... still not working. I can attach some EA but not all.... why? I have mql4 & Ex files. Please can yyou help? cheers
[Deleted]
Hi there,   I installed a custom indicator, which works flawless for other people, but on my machine it simply does not show up. I installed it in the correct folder. It shows up if I look at the currently loaded indicators, it shows up in the journal "Custom Indicator ARROWS AUDUSD, M5: loaded...
Hi When adding objects to a chart via an EA, such as buttons & lines, I've found they're being added to all of the charts object lists, but not to the actual charts. So if I right click another chart I'll see the object listed in the list without the object being on the chart. So if I have 10 charts...
[Deleted]
I have recently installed Mac version MT4 onto my My Book Air.It runs on wine and is by and large very good. However it seems impossible to instal three or four custom indicators on it, despite assurances from AXI that it is possible. Any contributions to solve this problem are very welcome. 
Hi guys, I have a question: Why in the indicator, the width of the line is more than 0 style is invalid Thank you for your reply. 
Hi All! I am currently learning MQL4 programming and I am so excited to have my very own expert advisor. Is there a MQL programming code that do the following: 1) Count the selected numbers of H1 candles from a specific time. e.g. from 2300hrs to 0200hrs 2) Determine the highest and the lowest among...
Hello everyone, I have an issue with error 4051 as you can see in attached picture. Code for closing is:       for(int p=0;p<OrdersTotal();p++)       {        if(OrderSelect(p, SELECT_BY_POS, MODE_TRADES) && OrderType()==OP_BUY && trend_M5==false && ST_M5 > 70)       ticket=OrderTicket();...
[Deleted]
i tried to create a EA for Binary option. My platform is MT4  (cretrader fx). but i can open the order. how can i use  the order send function plz help me to solve this problum this is the codes that i tried  OrderSend(Symbol(),OP_BUY,10.0,iClose(Symbol(),0,0),0,0,0,"BO exp:60",0,0,clrWhite);...
Hi I have the code below, that is a portion of code extracted from my project, which according to other examples I've read as well as the MQL4 documentation I've read, should work without a problem. I have alerts in amongst the code to inform me what is happening & the code appears to be working as...
Hi all, I have encountered an unexpected bug or error while using the ObjectSetDouble function, following is the program segment. #define error Print("Error: ", GetLastError());void Deserializer::Create(long id){   int len = ArraySize(this.obj);   for(int i=0; i<len; i++){      if(!ObjectCreate(id,...
hi, i want to create indicator that draw line at open prices on 10, 10 o'clock  bars.
Hallo, Is there a safety method to execute an exe-file from an EA?  traderdoc 
Hi,     I'm trying to automate an alert on  stochastic oscillator. I'd like to setup an alert every time the D and K line exit from the overbought and oversold area. example:k and d line go from 19 in t-1 to 21 in t0 , or k and d go from 85 in t-1 to 78 in to  How I'd develop this?...
Hello everyone, I have to insert a special condition in my marker. The histogram of the "Awesome" for a Sell must be red, for a BUY to be Green.......They do not need other conditions, such as negative, positive or particular values, but only the color of the spark plug 1 but with this my code does...
Dear all, I'm building a multiple strategy based on the RSI  levels: Between 30 and 70 use a certain strategy: Strategy N°0 Between 70 and 85 or 30 and 15 I use strategy N°1 And between 0 and 15 or 85 and 100 I use strategy N°2 (Although in order to move back to another strategy from srategy N°2...