MQL4 and MetaTrader 4 - page 37

Hi, I am new to this forum. I have just started to write my own EA.. I have the following codes.. if (Close[ 1 ] < B1S1Avg) // if previous close is below average price, then current price is nearer to sell level, so create a sell order to average up { //
Hello everyone and thank you in advance for your help. I wrote an indicator that, based on the opening and closing conditions of the past bars, creates rectangles in the chart. The indicator works well most of the time and updates correctly on the chart. The problem occurs when I try to change
I sent a MT4 expert to validation but it was returned with 1 single error but without any explaination of that error. This expert I originally programmed in MT5 and afterwards I converted it to MT4. The MT5 version passed the validation without any problems. Please refer to the sceenshot attached
  How to get bull/bear candle?  (17   1 2)
Hi, I need to get if is candle bear and bull. I found some code but not works. bool bullish = Close[ 1 ] > Open[ 1 ] && Open[ 1 ]; bool bearish = Close[ 1 ] < Open[ 1 ] && Open[ 1 ]; I need to find if candle is white is bearish and if is black is in bullish Check attachment
Hi guys, I have developed a strategy and got it into MQL4 using ChatGPT but I don't have the coding knowledge to get it to work the way I want to, in fact it doesn't execute trades at all when I try to back test it. I would love for someone to help me get it to work on MetaTrader. I know the
This was fine before new mt4 builds but is throwing up "cannot convert type string to bool" when I try to compile now, any ideas? if((bool)response.getAttribute("error"))
Hi all. I have recently used ChartSetInteger function to programmatically change sub window height (MT4 latest build 830). Once this code is applied to the chart, then I can't change sub window size manually afterwards. It seems the code fixes the sub window height and even if I drag my mouse...
I have an EA that only places orders of the BuyStop/SellStop type and only integer values. Of course the variable type has to be double, but the value is always an integer. When the price is touched, the order goes live. In one of my brokers, that has been working flawlessly for days. In the other
Hello, I read that it should be possible with std::bind or the c++ Boost library to bind a function pointer to a class method. Unfortunately I couldn't find any examples of this and I can't do it without help. Suppose I have two classes and I want to bind a callback from class A to an instance of
Hi gang, I'm struggling to get some data I purchased importing correctly into MT4. Two different problems seem to be showing up. First is each day only imports from 10:00-23:59, while my csv file contains data for each day from 0:00-23:59. Second, which I'm assuming is related somehow, is that
iTime ( _Symbol , _Period , 0 ); Should return the current bar open time , but I have an issue where it sometimes returns the previous bar time. I didn't think it was possible. Maybe if I RefreshRates() ? Edit: Nope. Still happenning
Hi folks, I didn't open Visual basic since 2 months; I opened it tonight and converted the "DDE-Sample.xls" to Visual basic with some improvements (a full pairs list). If you like it, I will make it save the history. Do you have any suggestions
Here is my basic codes structure: ... Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code. Hover your mouse over your post and select " edit " ... ... So basically, if I set numbers like the above when price reached the A1 (2)
Hi i would like to calculate lots such that if say account balance is $1000 to open trades with $100 in other words 10% and when the balance grows to $2000 to open trades with $200. This is some sort of incremental system that should maintain lot size of new trades at 10% of balance. How do i go...
[Deleted]
it's works fine on changing time period, but not with symbol. what do i mistake here ?? this for changing time period, worked correct. //+------------------------------------------------------------------+ //+- Roll 1 Button Period M1 ----------------------------------------+ if (id ==
Does anyone know how to draw a horizonal line from the open of a specific candle to the end of the day. For example, the open of the 2:00 am hourly candle. I know how to draw a line from the start of each day to the end. Just having difficulty figuring out how to start at a specific hour. Thanks
I'm using MT4 Build 900 on a WindowsXP. Today the Visual Mode and tabs at the bottom have disappeared. I've checked with two brokers. Same issue. I'd be grateful for any suggestions on how on a fix this
I'm looking for an MT4 EA that buy/sell every n of pips, like in a grid. Do you know? ciao
hi, using MT4 b745 on wine 1.7.32 i386 ubuntu for using an expert i need to add an url into /tools/options/Expert advisor/ there is already the builtin 'http://www.mql5.com' listed when i right-click on '+' nothing happen for adding a new url, so i double click on the previous url's field:...
There is no option to choose a Pro 5 RoboForex MT4 account
how to add news website for my ea ? it already has news filter but i need to add a website from mt4 option
hey , so i have an mt4 indicator that works just fine with no lagging or freezes on my terminal ,, but i gave to like 5 ppl to code it and all say they can run it ,, any idea why is that happening ? my terminal build is 1382
Hi All, I just started using mql4 few weeks ago. My EA is working fine in tester , but it gives me this error in live : Error opening BUY order : 0 The sell orders are executing correctly, only buy orders are not placing. I have tried running on different times with different brokers but same
Hi, I want to broadcast a message to all the open charts. The code is already written and there was no issue, but then I noticed that sometimes one chart's OnChartEvent is not getting triggered. It's always the same. Because I am still developping, only two charts have the OnChartEvent function so
So I'm attempting to build(fxdreema) a bot(mt4) that works within a certain time frame every day. I'm using the time filter block, regardless of the settings i adjust in the block no trades engage when back testing on eurusd. I'm curious if my terminal time is off any help would be appreciated
Hi Forum, I have the following code, but for some reason when I run the strategy tester, it does not do any trades - so my results page is just blank.. (Sorry, wrong formatted code before) // Input parameters input double RiskPercentage = 1.0 ; // Risk percentage per trade input int TakeProfit = 300
Hi All, Is there any way of changing the preinstalled line (See attached Image ) on MT4 to show different colours, EG: green for line up and red for line down?, I have found the option Chart properties (f8) where the candle colours can be changed but am unable to find the options for the line
Hi, How would I amend the below code to perform an action (for example Alert new Close Price 1 and 2 only) after the opening of the subsequent bar? I will be grateful for your help. //+------------------------------------------------------------------+ //|
  mt4 wont open  (1)
I have been gone for a few days and now MT4 will not open. There was a windows update just before I left but it was working fine. Now 4 days later it will not open/load