MQL4 and MetaTrader 4 - page 74

To post a new topic, please log in or register
Hi, I am new by MQL4. These days I read the tutorial from "https://book.mql4.com/samples/expert". On this side at the end there is an EA called "tradingexpert.mq4". But as I try this in MT4 for automated trading, I doesn't work. The EA seems can not be started. Maybe has someone experience? Many...
i searched very hard for this issue i want to count total lost orders in order history and total profit orders in the closed orders not open orders .... after i searched i found this code but seems doesnt work dont know what's wrong with it int TotalLostOrders() {  int TotalLost;  for(int...
Hi, I have been looking in market place and on the forum,  Does anyone know of a MT4 EA or Application that only manages StopLoss? It can be a fixed StopLoss, nothing fancy. I have a EA running and it doesn't have a setting for StopLoss. Would love to load a EA on another chart just to manage the...
Hello, The EA what i need must use different indicator settings from a custom indicator. a freelencer coded a ea for me but we see that this isnt work.. the wirtten EA have as input the settings for the custom indicator but the setted values isnt useable. The signals are Arrows (Custom indicator)...
I have created a simple MT4 EA that writes the datetime/open/high/low/close values for the GbpUsd to a text file.  The values that MT4 is returning are not accurate. The last record I received is at the bottom of this post.  It shows 1.2462 as the current price but the low for the entire day so far...
Hi everyone. I'm developing an EA and sometimes I get an error 4027 ("too many formatters in the format  function") when I try to modify the order SL. The error does not always occur: sometimes it works, sometimes it doesn't and I don't understand the problem. Here is the code I use:...
I can use ObjectGetValueByShift() to get the values of the channel's main line. But how do I get values of the second line? Is it possible at all? Calculating using linear equation formula based on time yields incorrect results due to non-linear time change in the chart.
I'm trying to get values on lines of an OBJ_CHANNEL created on chart. As far as I understand it, I would be able to get them with ObjectGetValueByTime  However, I'm nor figuring how to...  This is what I'm using for ...   Upper = ObjectGetValueByTime(0,trend,i1,0);   Lower = ObjectGetValueByTime(0...
Hi If I use iCustom like bellow to save 4 buffers, it run the indicator 4 time for each buffer and waste CPU and resources. I'm right?!   Buffer[i]=iCustom(NULL,0,"CustomIndi",1,i);   Buffer[i]=iCustom(NULL,0,"CustomIndi",2,i);   Buffer[i]=iCustom(NULL,0,"CustomIndi",3,i);...
I am a website developer, the client gave me 30 investors mt4 accounts login detail, then I need to display those mt4 account balance, profit, loss onto website. So each member login to the website can see the balance, profit, loss. Do I have to install 30 mt4 folder onto windows VPS, then write a...
I need help in adding code to my EA only to execute once per Candle and not per tick. Acn someone please assist with the code and where to add it please? // ------------------------------------------------------------------------------------------------// EXTERN VARS//...
Hello, I have been searching for an answer for my question all over the web, but I didn't have any luck. I have a simple indicator that takes an indicator called by iCustom and displays if it is in uptrend or downtrend in a 0/1 histogram. The code works well when placed on the chart and when I...
How to close/open  trade using time..... Please give any hint or references.... int bars = iBars(_Symbol, PERIOD_CURRENT); for (int i=0; i<bars && i<20; i++) { }
Hello everyone, I have a function that checks my percentage of daily profit. The target profit is 1%, when I took a test by the strategy tester in mt4  with 10 thousand, in the first operation I had a profit of 100.14: 1 2019.01.07 03:50 sell 1 16.69 1.14214 1.14315 1.14208 0.00 10000.00 2 2019.01...
Hi Guys,  I came across the attached indicator and was hopping if anyone could help add the higher high lower high and lower low, lower high rule text to the chart.  Many Thanks
instead of Bid I want to put Dailyopen ObjectCreate(LineName, OBJ_HLINE, 0, 0, Bid - pipDistance*Point); in below "daily open" indicator code i have put horizontal lines code but instead of Bid price i want horizontal lines on daily open. try to edit but compile error. Any Help Highly appreciated...
Please also add the weekday (Mon, Tue, ...) information in the status bar when moving the mouse above prices.
I would like to draw a rectangle in the background of the chart but with no colour fill. It looks like I need to set the 'back' property to FALSE in order to do this but I would like the 'back' property to be TRUE if possible so that the border lines do not draw over other objects. Is there a way to...
Dear MQL4 coders, please fix 2 error warnings in the below code #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 OrangeRed #property indicator_color2 MediumPurple #property indicator_color3 Red #property indicator_color4 Black #property indicator_color5 Black...
I have attached a indicator WeisWave3,  it showing coding Warning "Possible loss of data due to type conversion" please fix it up.
Hello, Im 3 month old programming student, i need help to debug this code. The indicator is supposed to place arrows on buy and sell signals but it just scatters arrows all over the chart on candles that dont meet the signal conditions and i have failed to understand what is wrong here. The buy and...
Are these written codes correct? that after several minutes before closing the shop get a position sell and with opening the shop close? extern int magic=1; extern int hour=12; extern int minutes=58; extern int second=10; extern int dayofweek=6; extern double lot=1;...
The below code is showing  Warning Message "implicit conversion from 'number' to 'string'" please fix it.... #property strict #property indicator_chart_window #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red //---- input...
Dear respected community coder.... I m newbie on this forum..... I have one issue..... .. Condition is "if bar/candle  open from low... To... High, i want code that closed the trade when bar closed at high.  Help should be appreciated........ God bless you. 
fftremblay
Hi, I have a small problem. I'm trying to work with global variables. I have a GV set by an expert. This GV = 50 (the right value appears in the Global Variables when I go to the tools - global variables menu). When I call this GV with an another expert, the expert is importing the following value :...
i discovered that after programming a scalper EA in mt4,it does wonderful in back test but on forward test it doesn't work well pls can someone suggest what i can do,thanks
Hi all, The value of my Comment doesn't change once it is initialized. I"m sure it has something to do with the docs below, but I'm not 100% sure because the Comment does initialize and show the value exactly 1 time then it's static from there on. From the docs. Please describe "Arrays cannot be...
Hi all, how can I determine the first H4 bar of the day ? I'm trading on H4 timeframe and need to analyze some indicators at the first H4 bar of the day. Help is appreciated. JoDax.
If I am posting in the wrong area Please let me know where the correct area would be. I have searched everywhere for an indicator that will place a horizontal line at the previous candles open close MID Point and no luck. And no the moving average set to 1 and H/L/2 is not what I want does anyone...
Hi please help. Below is a test code for placing arrows and sending e-mails based on two conditions. When attached to a chart, it backfills when conditions are met. This is intentional. I am unable to limit the e-mails to one per bar when the conditions are met. I am currently trying to use...