MQL4 and MetaTrader 4 - page 212

To post a new topic, please log in or register
Hi comrades. Please how do I sift my own forum topics? That is how to view all of only my topics in forum? I have searched for a link to click but I have not seen any. Thank you in advance.
  Orders delay? (11   1 2)
Heey people... I was sending two buy orders to shell and was ok.but today he is with delay.  This OK!!! if(OrdersTotal()==0)         {                 OrderSend(Symbol(),OP_BUY,1.0,Ask,0,0,0,NULL,0,0,Blue);                    OrderSend(Symbol(),OP_BUY,1.0,Ask,0,0,0,NULL,0,0,Blue);         }...
I would like to 1) display on the chart a button, that 2) when clicked executes a specified function. What is the easiest way to do it? I found: the OBJ_BUTTON page, but no simple (one-liner) API and no info how to add a click method: https://docs.mql4...
Hello to all. I need help to find out if the code I wrote is right or not. I wrote this code to mean that the condition is valid if I cross the RSI at level 50...... if(iRSI(NULL, PERIOD_CURRENT, 2, PRICE_CLOSE, i) < 50 && iRSI(NULL, PERIOD_CURRENT, 2, PRICE_CLOSE, i+1) > 50 &&............ I would...
The expert advisor I wrote is very slow in backtesting. Therefore, I attempted to rewrite it to only look at the recent closed bar, unless one of the preconditions for trading was close to being met, in which case it would calculate every tick, as before. Unfortunately, now the two versions produce...
Hello everyone, I have an EA based on making trades on daily chart. The problem is that whenever i start it, the journal doesn't send me a report of the EA being initialized at a specific time. Here is my code with printf statements. Only the "ea is not ready" string is being shown. bool...
  Date error in MT4? (15   1 2)
Hi, I run this code: Print("Year: ",Year()); and got 1900 instead of 2016. ??? What did I wrong?
Few questions about chart navigation with MQL (programming, not UI use): 1) How can I navigate/move/focus the chart to an existing object If I know the object name? (in a similar way when I click show in the objects list) 2) How can I navigate/move/focus the chart to a specified datetime?
Please help me, i am newbie in this things. i have tried to build my own ea with custom indicator but i have some warning. please help me to solve this! i do not know what to do :(...
hi friends   Im working on my custom indicator but Im having probleme getting the RSI for JPY/USD i can get only get the USD/JPY's RSI so, how to calc it ??   best regards 
I am testing a CHF based strategy but the CHF peg in early 2015 is causing irrational results so I was wondering if it is possible to code something that will prevent the strategy from trading on this date?
Hi, lately i trade a bit the dax. My Broker offers a 5 digit stream and so also on the dax i have 7123.x stream My range of supporting scripts uses 4/5 digit adjustment but fails of course on the dax, because even if the stream is 5digits i am allowed only to set the stops at full pip values. 7000...
Hey Guy,  How can I creat a Fibonacci? I already got my points, where I wanna draw it, but I don't find something to creat/code a Fibonacci? I found something like this: https://docs.mql4.com/constants/objectconstants/enum_object/obj_fibo But what is meant with those parameters at "CreatObject(...)"...
I opened post yesterday. I look that my post was deleted. Why did you delete my post ?  There was a stupid person who answered me, but I could not find time for answer. my post was deleted. The Stupid boy, I dont speak english very well. it is not important for me, I am not native english but I...
Hello, everyone.   Me and my friends are using the same account for trading. However, one of our friends want to set up a limit for sell. For example, I want remotely to set up limit for operations. For example block person not to buy or sell anything for more than $50. Also, for example if my...
A question to the gurus of MQL4. MarketInfo(Symbol(),MODE_MARGINREQUIRED) returns the margin required to open one lot. Is the realtion between lots and margin required linear? In other words, if I want to open 0.1lots shall I have freemargin > MarketInfo(Symbol(),MODE_MARGINREQUIRED) * 0.1? ...same...
Error message is *timeframe more than a D timeframe. 
hi guys,   im trying to write an ea with fractals on sell side it work pretty decent however when i use reverse logic over 50% of time buys turn to fails, i tried in different time setting didnt much help. i appreciate if any insight or method you can suggest to help me to figure this out   thanks...
I 'm looking a way to close my open order by a certain amount of profit is it possible ?? or do i have to close my open order only when the price is above the orderPrice ?? here is my code that close an open order: for(PositionIndex=TotalNumberOfOrders-1; PositionIndex>=0; PositionIndex --)...
  Update CSV File (15   1 2)
Hello Everybody, I am new to mql4 programming and trying to learn how to read and update csv file. Can somebody please help me out with this Lets say I have a csv file with sample lines like this 1, A, Y 2,B, Y 3,C,Y My requirement is to update Y to Z for all the rows, not sure how FileWrite()...
Hi,  I'm having trouble with an EA I'm writing in the sense that my orders are being closed very quickly (ie: before SL or TP is reached). I've examined the orders using OrderPrint() and I've noticed something odd. The manual says that OrderPrint() returns the following: #ticket number; open time;...
In OnCalculate() I have a ArraySetAsSeries with reverse order ....ArraySetAsSeries(open,false);ArraySetAsSeries(high,false);.... Then I want the Lowest Value over a specific range. I do this with: x=low[iLowest(NULL,0,MODE_LOW,IdLastBullish-IdLastBearish,IdLastBearish)] But this is not given me the...
Hello! I am facing an interesting problem that I have not been able to figure out yet. If anyone could nudge me in the right direction I would be super thankful. Let's say I have a simple indicator that indicates when I should enter a buy trade (illustrated as a yellow line in the picture). When the...
Hi,  Looking for some advice here. I'm trying to figure out how to automatically add SL, BE and TS to trades in MT4 that are triggered by a signal provider . I found a bunch of scripts that do this, but they need to applied to a chart, a currency pair, and I don't know how to apply it to a signal...
I'm trying to code an EA based on the support and resistance levels this indicator provides, but I can't figure out how to get the values. There are no buffers so I assume a little code needs to be added to this indi? Any help will be greatly appreciated....
DECOMPILED CODE DELETED MODERATOR: Please do not post decompiled code again
I want to create nice label at the right corner of my bar:       ObjectCreate("(D)", OBJ_LABEL, 0, 0, 0);       ObjectSetText("(D)", "(D)", 16, "Times New Roman", Blue);       ObjectSet("(D)", OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1);        ObjectSet("(D)",OBJPROP_CORNER,CORNER_RIGHT_LOWER);...
Hi all.    Having a problem that I've never experienced before. On various demo accounts and even my live account platform (different brokers) history WILL not download from the history center.  I go in, untwirl the pair, double click the m1, the available records load up, I click download and one...
Hello, Just to make sure i'm not doing something wrong because i'm a bit confused:   1. When i want to open a BUY position, i use the Ask keyword in the OrderSend ? 2. The STOP LEVELS global variable would also be regarding the Ask price? so if it's 4 than the minimum i can set my SL is Ask - 4 *...
I know how to create a obj_text and then attach it to the bar:         ObjectCreate("z1", OBJ_TEXT, 0, X_TopRight(), Y_TopRight2());       ObjectSetText("z1", "z", 14, "Times New Roman", Maroon);       ObjectSet("z1", OBJPROP_TIMEFRAMES, OBJ_PERIOD_M1);         datetime X_TopRight(int fidge)    {...