MQL4 and MetaTrader 4 - page 893

55839 - in this post, I learned how to open an order at the start of a bar. Am using this with great success. What I need to know now, is how to delay opening the order for X no. of minutes after the opening of the bar. Example: On the 4 hour chart, open an order at the opening of the 4 hour bar...
Somebody Please help, I don't want my ea to trade between 15.00 and 20.00 How should I code this and add it to my ea? Your help is highly needed. Thanks.
I am trying to delete pending orders but the pending orders won't delete. The EA  is eg: When the Buy criteria to "Open" is meet place a Buy at Market and place a  pending order. When the Buy criteria to "close" is meet then close the open Buys and pending order should be closed. Short Trades same...
[Deleted]
My EA is set to EachTick, but my objects does not update values/location when orders gets opend or closed. my code structure as following: int init(){WindowRedraw();ObjectDelete ("MyLine");}int deinit(){WindowRedraw();ObjectDelete ("MyLine");}int start(){WindowRedraw();ObjectCreate ( "MyLine",...
Hi, If I draw a horizontal line on W1 and switch to anyother time frame it disappears, on the time frame I switched to and also W1 - this is reallllly annoying... Any ideas if this can be done? Thanks mcia
It is often argued on the forum in the heat of the discussion that the wandering price is completely random. Let it not always be so. But randomness and not... difficult to supposedly distinguish. The theorems of the arcsine and double logarithm are occasionally discussed or quoted directly, or just
Hi, it took me hours today but as long as I had Symbol() in the deinit() function (in order to delete a market specific file) my terminal (build 509) seems to run into an endless loop with max cpu-time consuming - anybody who can confirm? As soon as I replaced Symbol() by a global var SYM set at...
[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