MQL4 and MetaTrader 4 - page 660

Does anyone have an OrderClose function that you can share with the forum? I am using the following two close functions (CareCloseOrder & CloseTrade)but they are not working very well. Do you have any recommendation to improve them? Do you think that one close function is better than the other....
[Deleted]
Hi there,   I would like to use different Buy / Sell / Buy-Close / Sell-Close values for different times of the day, but I cannot fond any examples where any time-of-day type if statements are used. Has any of you ever wandered in this direction?   TIA   mql4_Newby 
I think this forum may not be a best place to bring suggestions for improving mt4 platform. Can a moderator tell me what would be right place to write to MetaQuotes?
Hi,    I got a new mt4 trading account recently, I just place my EA as usual, my expert tab show ea initialized, chart windows show smiling face, everything loading as normal... I found it strange for few days with no order, so I tested with an EA instantly place pending order and it's not working.....
Hello, I've searched the forum and google but I couldn't find an answer to my problem. I want to know if it is possible to call the EventSetTimer() function outside of OnInit() because I want my expert advisor to start the timer after a condition in the OnTick() function is met (like profit > 1:2...
Hello, When using a parametric constructor, what is your way of validating the constructor finished ok and the parameters satisfy the class business terms? A constructor has no return parameters, how do you check if it finished ok and in case it didn't, what do you do? If you don't use an Initialize
Hello, I have a buying criteria and a selling criteria What I want is to close a buy order if: 1) Selling criteria occurred (Reversal) or 2) If another Buy signal occurred after opening the first one. I want to close the first buy order and enter a new buy order. And vice versa for the sell order....
[Deleted]
  AnyPair SMI  (10)
Hi guys, maybe someone here can help me. This indicator is giving no output, I'm trying to adapt a Stochastic Momentum Index to use a different pair than the one on the chart. The first file is the original I'm using (SMI_Correct_1), the second one (B45a_SMI_AnyPair) is my adaptation. Any help
Hi all, I'm using the expert Renko Live Chart v 3.2 but I receive this error: can't create / open history file: cannot open file: EURUSD2.hst Where is the problem? DLL are enabled.  I see file EURUSD2.hst in the history folder.     
[Deleted]
I would like help to change the settings of this indicatorso that it is accurate for my time zone and trading platform. My time zone is Brisbane, AustraliaGMT + 10 My trading platform time is GMT + 3 Open markets in green font Closed markets in red font...
Hey guys i need help adding push notification to my source file      I know i declared it correctly using extern bool   Push_Notification = true;  and using this snippet here if (alertsEmail)   Push_Notification();       Here is the source code      //---- indicator settings #property...
[Deleted]
Say I have a grid system that can open up to 5 trades in a basket with a 1.7 lot multiplier. Assume the first trade in the basket is opened with a 0.1 lot size. The spread between each trade in the basket is 21 pips. I need to calculate how many pips against this 5 trade basket an account can with...
Let's say that I have 15 years of historical data (1M OHLC) for AUD/USD and NZD/USD; however, I don't have any data for the AUDNZD. Is it possible to calculate the AUDNZD with AUD/USD and NZD/USD? Example, for open price  AUD/USD * USD/NZD, the USD will cancel itself out; hence, we can obtain the...
I'm trying to add a 'Trade' / 'NoTrade' element to my EA. My plan was to have a list of dates on which I don't wan't my EA to run, so UK Bank Holidays and US Holidays that kind of thing. My plan was to have a list in an external file that would be referenced by my EA to compare the results of a Date
[Deleted]
  PLEASE HELP!!!  (3)
I ´ ve this programm: stat...mq4 but wenn i start it profilling non-stop . but really it would create a text- file .what is wrong?with someone else the same program worked. any file must be added maybe even ? or so A text...
Hello, when I launch an expert advisor based on divergences, it draws lines on price and on stochastic but when I backtest it, the lines are not displayed on the stochastic. Could you help me with that ?
Hi all, I don't know how to recall the last bar open time. Could you help with the below code? I need to replace the string "LAST BAR OPEN TIME". Thank you!!!    total = OrdersTotal();  Num_Order_Long_6  = 0;  Num_Order_Short_6 = 0;    for(cnt=0;cnt<=total;cnt++)     {     OrderSelect(cnt,...
Hello folk,  I was wondering if anybody of you know a reliable way to programmatically abort a MT4 backtest. The point is that if during an optimization pass a given halt condition is met, (e.g. DD > 5% or a custom OnTester() value is over a threshold etc...) there's no reason to continue the test...
[Deleted]
Hi,   I'm trying to figure out a way to create user defined variables based on the Bid and Ask price that will be set when the Expert starts and that stay the same until the Expert is de-initialized or the values are changed programatically. In other words I don't want the value of my variables to...
Hi:   Is it possible to color the candles in program? for example, if the candle close is above 20 Moving Average, I want to color the filled bull bar in blue and bear bar in a blank blue bar. If the price is above 20 MA, color it into a filled red bar for a bear bar and blank red bar for a bull bar...
my accont banned. help meee?
Hello I can not increase the number of buffer: I have put IndicatorBuffers (12); initially 8by allocating additional buffer for a table and a label (my_info ...).SetIndexLabel(8,"my_info"); //Sim SetIndexBuffer(8,my_info);   //sim   SetIndexLabel(9,"my_info2"); //Sim SetIndexBuffer(9,my_info2);...
Hi..Ive looked around in MQL documentaiton to see if there is something that could help me count my trade volume in each candle, but couldnt find anything. The only function i found was Volume[0], which calculates the total volume for the bar, which is not what I want. Is there any function, or any...
Hi forum, I made a script which should change the current timeframe to M1, then make a screenshot and change the timeframe back to the original one. But I always get a message from metatrader if the script should be terminated. I read in the documents that ChartSetSymbolPeriod() is asynchronous and...
Good day,I need help create this indicator for Intermarket spread chart ,just a simply subtract the prices one market from the other and plot the difference as a line chart (the closing prices) in sub windows so that I can apply indicators into it.Thank you. Attached the sample chart.
  Is my EA safe?  (1)
Hello there. Im trying to sell one of my EAs. Im thinking in giving a client a DEMO of the EA, capping its use with some function like: "if(TimeYear(Time[1])<2016)". Is is my EA safe with new version of metatrader safe? I heard that version 600+ is very difficult to decompile. Thank you
[Deleted]
  EA signal  (6)
Hello,   Waht I need to write in the EA code if I want that every time the indicator(attach) change color the EA will open BUY/SELL order?  
Ok this is very strange, Im working with a indicator bought in the mql5.com marker.  The indicator in question is this one:  https://www.mql5.com/en/market/product/4518 Ok so I have this indicator activated in my terminal and I can make use of it. And in the image below you will see that I can...
[Deleted]
Guys, Have anyone here tried to play any forex based games or contest? Would appreciate all your advices.
Please, help as the above symbols are missing. How can i get them back?