MQL4 and MetaTrader 4 - page 874

[Deleted]
Hi there, i recently restarted programming MQL4 and made myself a Trailing Stop EA. Sadly the following version, which shall "trail" the Stop Loss depending on the Highs and Lows of the 3 most recent closed candles does absolutely nothing when activated: int init(){   return (0);}int deinit(){...
Hey All :) New quicker question this time! How can I tell "Close[1]" to be focusing on the 4 hour time frame, irrespective of the time frame I am currently looking at? Close[1] > Hour4_60 // EMA -//- I want that Close[1] to be the close of a 4 hour bar? Many thanks as usual!
Is it possible to Create Specific color for some Print statements that show in the Experts tab ? To highlight some print statement to find easily. Thanks
Hello Apologies for another really dumb question, but its beyond me! In my EA, I'm collecting and writing data into weekly Excel spreadsheets, which I'm incrementally numbering, creating one new sheet per week. This is fine, but I end up with spreadsheets all named as numbers only. I'd like to use...
I have seen here at many places refer http51.dll but where is it ? Where can I find the source code ? I tried surfing through the complete code-base but no luck. Hopefully, someone can help.
  Help with ADX  (16   1 2)
I dont know but i guess ADX indicator has no fixed marginal limit between to move like stochastic or rsi.My problem is that i've set up a setting where it will only take trades if ADX>50 and it wont work it will take trades whenever it wants even below the preset 50 level.But if i set a value like...
[Deleted]
Hi guys, i'm searching with an EA in all Forex Pair for special conditions. If the EA says yes, i want to open a chart of this pair und put an arrow inside. Is this possible? I can't find something like this. The problem is there are 5-10 results and i don't want to open them by myself and put an...
[Deleted]
Hi, I have an EA that worked in back testing. However, a part of it failed in live trading. When a level is breached, it supposed to close a short and open a long. Although, it's doing so in the back tester, it failed to open the long in live trading today. I added the print function today, to see...
Hi, I would like to know how can I find an indicator window with mql4 where more than one indicator is attached, like on the screenshot below. There is 3 different RSI in one subwindiw, but WindowFind() does not work for "RSI(14)" and "RSI(21)". Thanks.
I would like an Indicator to do the following Horizantal lines 1000 pips range then 4 quarters of 250 pips then half the quarter with 50 pips above and below. then to do that on all the charts I have attached a pic for you also the Indi should do example GU 1.5000 - 1.6000 - 1.7000 should show...
  basket pips  (3)
I'm trying to tackle an area re: basketpips I'm not sure if i ought concern myself with pipvalue at all. i.e. http://www.earnforex.com/pip-value-calculator Account Currency AUD Currency pair AUDJPY Position size, units 100000 Current AUD/JPY 87.672 Price of pip 11...
[Deleted]
I need an very simple and easy ea wich is opening every 100 an buy trade and every 200 and sell trade ! But I am a very noob when it is going near to programming something maybe someone helps a noob ( I will be very pleasured in your help ! Kind regards Nikita
I would like that the maximum slippage for the OrderClose function to be the distance between the current price action and the preset STOP LOSS I set it like this but it doesnt work,it gives me an error 4051 for invalid slippage please help: FOR BUY:     for(i=0; i<OrdersTotal(); i++)   {...
everyday I want to get high/low value for first candle.ie. 00.00AM I tried with 4hr TF: But shows different candle high/low.i valdiate date with nday!=Day(); Please help me to fix the issue. #define  ZEROAM 00    int shift=iBarShift(NULL,0,ZEROAM);    hval=iHigh(NULL,0,shift);    lval=iLow(NULL,0...
New article Building an Automatic News Trader has been published at mql5.com: This is the continuation of Another MQL5 OOP class article which showed you how to build a simple OO EA from scratch and gave you some tips on object-oriented programming. Today I am showing you the technical basics needed...
Assume ! my interrest separate windows is number 2 ( Total separate windows = 3). How about code for self get this separate windows? thank you
[Deleted]
I want to play sound when: 1. Pending order active>>sound1 2. TP reached>> sound2 3 SL hit>> sound3 int start()  {   int    counted_bars=IndicatorCounted();//----   temp = 0;   for (int i=0;i<OrdersTotal();i++)   {      OrderSelect(i, SELECT_BY_POS);      if (OrderSymbol() == Symbol()) temp++;...
I downloaded the latest build of MT4 (509) and tried to use the strategy tester offline with tick data.. It reads the EAs that are EX4 files but does not seem to read the EAs which are MQL4 files. Is there something I am doing wrong?
Hi!! Any one please help me to find this problem; when i use iCustom to call "FXA0 - RSI Crossing 50 plus ATR ver1[1].2" indicator only 0value return to me at all time. double RSI=1; RSI = iCustom(NULL, PERIOD_H1, "FXA0 - RSI Crossing 50 plus ATR ver1[1].2", 0.15, 21, 21, 2, 0);
Hi, the idea: start a function on Saturday or Sunday when the market is closed that e.g. investigates the performance of a (each single) system or of all together in order to e.g. change the parameter that e.g. calculates the lotsizes for the next week. The start()-function is started at each...
Hi all: I just notice that on MT4 platform, there is always a Sunday's "small" bar which is usually considered as part of Monday's market behavior. Is there any way to absorb the Sunday's bar into the Monday's Bar please? Thanks
int TrailingStop[10];int init()  {  Print("+++++ init done");  string s =DoubleToStr(TrailingStop,0);  return(0);  }int deinit() { return(0);   }int start() {  return(0);  } compiles well on compile time, but throws error on runtime: EURUSD,H1: invalid double number as parameter 1 for 'DoubleToStr'...
Hi all, I need to get the number of orders that have been closed. Could you show me how could one get that from order history ? thank you in advance for any support provided Luis
Just a snippet of information that I have not seen written into the documentation it might be useful to someone when debugging. I accidentally declared a variable both globalscope and localy it works in the following way. If a variable is declared globalscope and a variable of the same name is...
[Deleted]
Hi dear noob brothers (and other). I've been suffering from this "unbalanced left parenthesis" from time to time and wanted to share with you an article I've found here, on how to find them in a more comf. way: https://www.mql5.com/en/articles/1547 Enjoy.
Hi, My code for adding Martingale money management to include in the lotsize calculation works in the tester but doesn't appear to work in a live account. (Please note my code isn't the prettiest, or possible the most efficient, but it did seem to work in tester, so appologese for posting so much...
I am new to Forex and MQL4 and currently trying out several systems. I'm trying to build an indicator that would draw an arrow when the conditions are met. I did some research and took a stab at writing the indicator, unfortunately it is not working. I would really appreciate any help in making this...
Hi, I want to close old order when new bar is opened. I tried to code it, but it doesn't work. Please tell me what its wrong. Thank you. double last_bar;int init(){//----   last_bar = Open[1];//----   return(0);}//------------------------------------------------------------------int...
[Deleted]
for(int C = 0;C<Bars; C++){string name = "Label"+C;if(ObjectFind(name ) != -1) ObjectDelete(name);ObjectCreate(name ,OBJ_LABEL, 0, 0, 0, 0, 0);ObjectSet(name, OBJPROP_COLOR, Green); ObjectSet(name, OBJPROP_TIME1, Time[C] );ObjectSet(name, OBJPROP_PRICE1, High[C]);  ObjectSetText(name, "Test", 10,...
I am try to write a EA help me to check Candle sticks, but i don't know how to coding it, somebody who expert MQL4, please ! help me . - I have a Candle sticks on time frame M1 . - One Bollinger bands with Period is 18. - One Moving Average (3, exponential, close). - One MACD Histogram. - One...