MQL4 and MetaTrader 4 - page 395

Hi all, I want to change color of custom indicator dynamically based on close price. Below is the code snippet. #property indicator_chart_window#property indicator_buffers 4#property indicator_color1 Red#property indicator_color2 Green//--- input parametersextern int       Period=5;//---...
  Order OCO on MT4  (1)
Hello, Is there an Free EA to make OCO orders? For example: I wish to take two orders with limits. Order 1 - Sell GBPUSD at 1.3185 Order 2 - Buy GBPUSD 1.3100. If order executes, this automatically cancels order 2. Thanks for your help.
Hello, i newly have the problem, that my expert which runs in debug mode, is closed. The uninit reason is 4 -> Chart removed. No error else in the expert log. The chart in fact has been removed.  This happens, when there is a pending oder, i right click on the pending order, then i select "Modify or...
I am having the above problem. I have coded iHigh(Symbol(),PERIOD_D1,0) in order to have todays highest price.  But instead the display on the chart of the result of code shows it is giving the highest close. This could be an empty 4 problem
So i have this indicator which I have found to be very good at identifying trending periods, to stay out of the market. However, it does not have any alerts which makes tracking it hard. It would be much appreciated if someone could help me to add a push alert when the purple line goes above the top...
Hi at all, can i use this ---> OrderSelect([int ticket], SELECT_BY_TICKET, MODE_HISTORY)   ? In the execution this method run, but the return is unexpected for me. USE CASE: i have open a buy order, ticket of this order = 97936536 run my EA, and test it (order ticket 97936536. it still open):...
Hi, what if i set a BUYSTOP at 1.100 with a SL on 1.099 and TP on 1.101 And then during open, slippage occur and move the actual buy open price to  1.102 witch is above the desired TP. Will the trade server response be error 130 invalid TP/SL or will it go thru and close the order directly?
Hello How to add time filter for an indicator ? Can anyone help me. For example begin time: 23:00 , end time: 03:00. between 23:00 and 03:00 indicator should not work. Can't use TimeCurrent() like Expert advisers and have to user Time[] array instead. But cant use StrToTime too because it always
Is it possible to copy signals from a live account to a demo account?
  Order Close  (1)
Hey guys, Sorry to bump in here, I'm trying to set up my first robot, woohoo. So far i succeeded in defining inputs for the indicators which do display! Orders are being opened as well but I'm a bit struggling with defining code to close them. At this moment I would just like to close the trades
  Useful features from KimIV  (1278   1 2 3 4 5 ... 127 128)
In this thread I will post the codes of my functions in MQL4, give examples of their use, and answer questions related to their use. Each function will be published in two posts. The first post will contain the function code, the second - examples of use and short explanations. Sometimes I will
[Deleted]
Trying to install MT4 platform but cannot load charts. Every attempt to load the first chart causes the same error message: Failed to create empty document Have done many MT4 installations over period of 3 years, but not seen this before. Already uninstalled and reinstalled several times,...
  OrderModify  (4)
When I want to modify only the stop loss of an opened order, should I use zeros for price, takeprofit and expiration parameters as shown in the following? OrderModify(OrderTicket(), 0, newStop, 0, 0)
I would like to build a homepage where i can display important data from all my MT4 accounts like: MT4 account number Order number (open trades) closed trades Profit Margin The clue is to get at first sight a overview every account at one view, without login in every MT4 account with MT4 App...
[Deleted]
Good day to all. First I would like to thank you all for the work you folks do... Thank you I am having a problem with custom indicators not showing on charts. They show in my list of indicators. But it does not matter which indicator i try to load on the charts, nothing shows. But It shows it is...
  Pending Orders  (1)
Please is there a difference between 'pipstep' and 'Distance in pips' in Orders  like 'BuyStop, Sellstop' for Expert Advisors. OrderSend(Symbol(), OP_BUYSTOP, start_lot, Ask+ Distance*Point, 3, Ask+ Distance*Point-SL*Point,Ask+Distance*Point+TP*Point, "", Magic, 0, clrBlue);
Hi, Have been testing Kelly MM, the results have been mixed but overall there seems to be more profit and less DD and losses. But... I've sampled less than all trades, typically the 6 - 30 last trades were used in the Kelly calculations. Hard limit was set at 0.3 x Kelly, although I've seen the...
Hello how can i use Mathmax and mathmin functions if i want to compare yesterday high and hour high
Hi, I want to get all Symbols in my present orderlist in an array. But if the symbol is already in the list, the loop must take the next one. I am stuck here. Maybe someone knows how string Pair[]; ArrayResize (Pair, 1 ); int size= 1 ; for ( int i= 0 ;i<= OrdersTotal ();i++) { if (
hi dears, I open my orders manually, so I'm looking for an EA that can close all open and pending orders when 2 ema cross for example: if the cross happen between 5 ema and 8 ema , the ea will close all open and pending orders if the cross between the 2 ema happen again , the ea will close all...
Hi Currently I'm using this code : if ( (10<x) && (x<20) ) There is another way without && ?
When I draw trendlines or anything else on one currency pair, the drawings appear on another random pair or pairs that contain one of the currencies of the original pair. That is with using one chart and market watch to move from pair to pair. I have tried saving profiles and templates, but this did...
Hi there, I would like to trade in such a way that utilises fibonacci levels that overlap or are present in close proximity, known as fibonacci clusters. My question is, can anyone point me in the right direction on an indicator or trading method for MT4 to allow me to trade fibonacci clusters...
  MetaTrader 4 Platform build 1118  (53   1 2 3 4 5 6)
I have some problem with the tester in MT4 build 1118 A) after optimization I can test the selected results only once , the second time I get a different results, the third time no result (empty graph windows ) B) after optimization if I try to close MT4 it freeze  C) the tester is twice slow...
Is there a way to signal when a bar ends and before the next bar begins?  I'd like to set pending orders before a bar starts (typically a day bar).  Is there a way to do that?  I know how to get the beginning of a bar but getting the end of a bar alludes me.
[Deleted]
Whilst working with the MT 4 demoaccount I come upon a problem. Iuse Fibonacci Retracements with the numbers; 0.0 14.6; 27.2; 38.2;50.0; 61.8; 78.6; 88.7; 100.0; 114.6; 127.2; 138.2; 150.0; 161.8; 178.6; 188.7;200.0. To each number I have added the respective price leve, in MT4 (%$). The MT 4...
I do use /portable  mode on MT4 (multiple instances), and do try to update today just by overwriting two files metaeditor.exe and terminal.exe with newer versions from resent build. And for some reason MT4 can not connect even with new builds. Anyone having similar issues?
someone has ifractal-ex mql4 file that working well .My file is not work.
Hello friends, I am a little confused at the moment. I'm not sure if a nested do while loop will corrupt data input after conditions change. This post isn't really a question, but more advise weather or not a nested do while loop is ever effective or, a total waste of code space. I'm sorry if my...
  This is a mystery to me!  (13   1 2)
I have written a small EA and when testing I get the infamous ordersend error 130: invalid stops message.  3 14:49:36.262 2018.12.19 09:29:25  SpikeScalper GBPUSD,M1: OrderSend error 130 0 14:49:36.262 2018.12.19 09:29:25  SpikeScalper GBPUSD,M1: Alert: Open Sell Order - Error 130: invalid stops...