Download MetaTrader 5

MQL4 and MetaTrader 4 - page 797

To post a new topic, please log in or register
I have noticed that slippage doesn't seem to work (or the broker doesn't care) when I'm placing orders on a broker who uses the extra digit. If the market price is 1.23456 and I try and place an order at 1.23450 it get "invalid price" even with a slippage > 10, that can't be right. Am I missing...
if some one can help me out with this i'm trying to draw an histogram like this & so far without succes legend: green = above 0 & above signal blue = above 0 but below signal orange = below 0 but above signal red = below 0 & below signal...
Few days ago I opened, in MT4, a custom indicator loaded from a forum.Since that moment, the MT4 have problems opening (do not open). I used therepair function, and uninstall and reinstall the program, several times, andstill have the same problem. Why this is happening and what can I do to fix it?...
Hi, I want to write an indicator that draws 2 symbols (e.g. Gold and Silver) in the main window and their difference in the subwindow. How to do that when I must declare the property indicator_chart_window or indicator_separate_window?
Hi! I have EA (Yeaaa!) which uses selectable Time Frame TradeOncePerBar function. I want to store the value in GlobalVariableSet to prevent EA trading in same Bar when MT4 or EA restarts. Original function for TradeOncePerBar is: if (CheckAlertTime == iTime (NULL, 5, 0)) return(0);...
Hi. I'm trying to plot dots when a given condition takes place. For a simple example, consider bars that close at their high. Trying to put a dot at the low with this code: if( High[idx] == Close[idx]){ string DotName = "Dot_" + Time[idx]; ObjectCreate(DotName, OBJ_TEXT, 0,...
Apparently build 229 checks for a debugger and will not run if it is present. Not only is this suspicious, it also stops mt4 from running under wine on linux. Is this really necessary? 
good morning at all i am using metatrading platform for some months and i haven't had any problem with the expert too. some days ago my friend sent me an expert in .ex4 format. obviously he didn't send me .mq4 format i have tried to attach the expert at the chart but he doesn't work. he keep...
With MT4, I used to have EA alert me when a trading signal is available, then I will consider trade or not myself. But with MT5, the option to have EA ask for manual confirmation is taken out, and the EA will just go ahead and trade quietly, this might be good for someone, but surely disappointed me...
Hi, to get a full graphics display (without a visible terminal) i'd like the 'profit' as a visible point in the graphics. Where can i find that 'profit' variable ?
Hi to all MQL4 community! This is my very first post here looking for help because by this days i'm trying to customize this "Bears Bulls Power" indicator made by Waddah Attar adding to it a moving average but with no fortune yet... I read many articles about iMAOnArray and i understand the function...
I am new to coding and would like to add a code to expire an EA. So after the day I add, the EA will no work, and hide my EA setting all at once. How do I do this? Thanks :)
Anybody who can help? or point me to someone who can?
Dear friends, This is a sample regarding the usage of operator "continue" from https://book.mql4.com/operators/continue. I have a slight change in the coding resulting in different outputs. Could you enlighten me how the difference occur? Problem 16. There are 1000 sheep on the first farm. The...
There's no way to set the background color of a text object (OBJ_LABEL or OBJ_TEXT) that I can find. A workaround would be to draw an OBJ_RECTANGLE with background property set true. This is all well and good when these objects are in a fixed location on the chart. I want to be able to specify...
Sometimes I don't want to read the entire string in my file. I just need to read the 5th character and stop at the say the 10th. The string can have in access of 100 characters, and no delimiters. May sound strange, but there is a reason for no delimiters - so i cant use them in this case....
Hey there, is there any possiblity to access other symbol windows then the active one? I want to use ObjectsTotal on a window which is not the active one. But ObjetsTotal has no parameter for things like that. Thanks,f.
I have a doubt about the strategies testing of MT4: I try a strategy and gives me a result of $ -10.000. Then,I leave the same strategy, and the same time for the test, and only change inthe next parameters in "ordersend": The Operation type: reverted OP_SELL to: OP_BUY The Stop loss: Bid +300 *...
Hi there, thanks for taking the time to read my post. First I thought of an EA but since I just want it to open a position an place a stop it might work in a Script aswell. I am not that good at coding so I first ask someone who has some experience before I start the work. Ok. I don't know if you...
  How to code such EA (20   1 2)
Hello! I want my EA to open new order when price is x-pips from last open order. EA opens buy when price is x-pips over last candle close. Then I want to open another buy when price is x-pips over from last open buy. I try like this but doesn't work. Thanks!...
I’m new to MQL4 and need some help to program EA which should: Open order with S/L and T/P and before or if it hit S/L EA must open new order in opposed direction. Thanks, Andrei int start() { if (OrdersTotal() == 0){ OrderSend(Symbol(), OP_BUY,LotsOptimized(),Ask, 3, Ask -...
This might be a dumb question, if yes - I apologize for my lack of know how. I am curious if this is okay code. I'm talking about the while operator at the end where I call the ModifyShorts() again until the result is false. I'm just trying to make sure I'm bug free and that the code completes it's...
Hey guys, I had spend days to investigate this issue but I could not come with a solution so I post it here so we can discuss further the issue. Issue: Mt4 server uses the London time zone as they preference time therefore you can easily see that there are 6 daily candles in 1 week in the MT4 chart...
I intend to purchase a smartphone and want to run MT4 for smartphone edition, so that i can check on it anytime anywhere. can anyone advise me whether which OS is compatible? Iphone4 ? Android ? Window 7 mobile? Thank you.
hi, I am performing some hedging with my ea and it works great, somehow I want it to make profits more often so I want to add positions as the profits move up or down kinda like "double sided martingale". I wonder if someone is willing to help me with this easy thing I just don't know how to program...
Hello, Most examples I have seen, send an ordermodify, once the trailing stop is hit that is, with EVERY tick hereafter. Is this the right way to do it? It seems to require a lot of processing time and will generate warnings since the modify orders are coming in too fast for the server. Wouldn't...
Hi I need some help please. I have 3 monitors and I monitor 8 FX pairs. I was told to drag the bottom right hand corner of the MT4 window across 2 of my monitors which I did. I then fitted my 8 chart windows within the 2 monitors and all was fine until I maximised any of the charts. This single...
Hello I was wondering can the MACD and ATR in the custom indicators folder be modified to show the values of the last say 4 candles as well as the current candle? Thanks Antony
Hi!! Mt4 normally use with EA. For two days I have disabled the ability to launch purchase orders and sales and the EA has no ability to launch commands. The new order button is grayed out too. I turned off the EA and the problem continues. Anyone know how could I turn back orders?