MQL4 and MetaTrader 4 - page 68

  Object Trendlines Properties  (16   1 2)
I've created a trendlines into a small vertical line to fill the candle body, so that I can change the body colour of some candle if they meet a particular condition. When I increased the thickness of the line to fill the body, the line ends become so rounded that it extends beyond the body of the
Hey, everybody. Hope everyone is doing good. The following is an attempt to create a simple EA that uses 2 Indicators (EMA 103 Length and a TDFI with 10 Trend Period) to do scalping. It is a work in progress but I would like any recommendations and a little bit of input help in adding risk and lot
Good day everyone, I created a program using MQL4 Expert. The program was successfully running using EA (void ontick). the rsi value and some string are shown and working properly. After that i create a panel/dialog using include program with class which i want to attach the early program that i
Hi everyone, I need an elementary script for MT4 that when I open (click) a buy operation replicate the same operation 10 times and put stop loss 10pips under purchase price for this 10 operations. I have no experience in MQL4 scripting .. Thank you for the help
double first_order_price = Ask; // store the price of previous order // Open 2st long position with smaller price if (Ask < (first_order_price - 10 * Point )) { ticket2 = OrderSend ( Symbol (), OP_BUY, lot_size, Ask, 0 , stop_loss, take_profit, "Test" , MagicNumber, 0 , Lime); }
[Deleted]
I often find that I want to go back to review a specific set of trades. Is there a technique that will allow you to go directly to a specific date/time on a chart? The manual scrolling is very tedious, and when you change something the chart flips back to the current time. Is it possible to...
I need help fixing this error in my code: "Unexpected end of program' and 'unbalanced Parentheses". When i try to fix it i get more errors. Here is the code: void OnTick () { // Check for open orders if ( OrdersTotal () > 0 ) { return ; // If there are open orders, do nothing
Hello, I am trying to upload a new version of the EA to the market but I am getting error 130, I know what it is and I test it in strategy tester however the problem does not exist here, So can someone tell me if it is mine problem or problem of validation server
I'm trying to double the previous trade lotsize if the last trade was negative in the following code : double last_lot; double lotSize = AccountBalance() * percentage / (StopLossPips * MarketInfo( Symbol (), MODE_TICKVALUE)); int total_orders = OrdersHistoryTotal(); int loss_trades_count = 0 ; for (
What does this mean and implies? I see the bot not taking trades 2023.04.21 16:58:18.083 ....... EURUSDm,H1: **array out of range in '65391-55581.mq4' (4857,29)** I got that error when I load my EA on the chart and refused to take trades and it is only happening on my VPS, everything is good on my
Hi Guys Does any one know how to change location of Trend line description ? Normally is anchor to the beginning of the line. Can't find any thing in docs about it. https://docs.mql4.com/constants/objectconstants/enum_object/obj_trend
Hello to all, I am a beginner in mql4 programming . I would like to know if there is a function in the mql4 language that will allow us to control the rsi or cci indicator. is to say for example : if the line of the rsi exceeds the level -80 from the bottom to the top make a buy if the rsi line
// Déclarations double MMS5, MMS35; int ACHAT1, VENTE1; // Fonction OnCalculate void OnCalculate ( const int rates_total, const int prev_calculated, const int begin, const double &price[]) { MMS5 = iMA ( NULL , 0 , 5 , 0 , MODE_EMA , PRICE_CLOSE , 1
Just want to confirm it is possible to set multiple take profits on mt4. For example if I were to place a single buy (.3 lots) at price lvl 100, I’d be able to place a .1 sell stop at 105, .1 sell stop at 110, and .1 sell stop at 110. Hope that makes sense, Thanks
Hi, I'm trying to pass some values from EA to a custom indicator and vice versa. So It's a two way communication. I'm using MQL4. I do it by creating chart objects in the EA, which contain the value I want to pass to the indicator. I encode the value in the object description . When I call iCustom
Hello! I have a problem with the market watch window in my MT4 platform and I cannot put the window back to its left-side place where it is used to be. I do not know what I did exactly and put it in the way that you can see in the screenshot, but my problem is that I am not able to put it back to
pls is my code correct.. { double profit= 0.0 ; datetime from= 0 , to= 0 ; double start_balance= AccountInfoDouble ( ACCOUNT_BALANCE ); double end_balance= AccountInfoDouble ( ACCOUNT_BALANCE ); datetime last_order_time= 0 ; int trades=OrdersHistoryTotal(); for ( int i= 0 ; i<trades;
Hi, When in the history center I can only download previous 6 months data. I presume as far back as my broker allows ( [broker name removed by moderator] ) When can I download tick date from then upload to MT4 via CSV? Thanks
[Deleted]
Hello Folks, I'm quite new to coding, do however manage to write some stuff which works as expected. I need clarification on one thing at this point. When and how to use { } I guess I use way too many brackets, which seems not to hurt anything. But I would like to know if there is a reson to use...
Can someone modify this ea? Just want changes in orders. I want when any hedge trade active, previous trade will be close. you can see it in pic.. Thanks Suhas
My EA log keeps reporting this error when when it tries to access files on my computer. I have: Double-checked the file path to ensure it is correct. Ensured that the MT4 terminal is running with administrator privileges. Checked if the file is being accessed by another program or process. Created a
1. code: ObjectCreate("text_object0", OBJ_TEXT, 2,0,0,0); when it was executed, it is complainde that "unknown subwindow number 2 for ObjectCreate function". I don';t know how to resolve this problem, and why it is; according to my memory, the max number of subwindows is 8. 2. code:...
Hey guys Maybe some of you can help me. I installed MT4 on a new notebook and when I try to open a new demo account the "Account type" field and the "next" field are both greyed out Any idea how I can fix that? I tried to re-install and change mail/phone number already but nothing seems to work
Hi, I want to use dll files to get lot size from One Click Trading My Progress, I got the handle of that edit box using below code: #import "user32.dll" int FindWindowW( string className, string windowName); int FindWindowExW( int hwndParent, int hwndChildAfter, string className, string
Hello, So I am trying to test a strategy for BTC in my mt4. I have downloaded all the tick date to get a 99%modeling quality. And the EA is working as intended. The only problem is that the spread is not being taken into account. The spread for BTCUSD is 17$ or 1700 points in my broker. Even If I
I have written a custom indicator code, and it will attach a to the MT4 chart successfully and error-free but nothing will appear. It is supposed to show me some up and down arrows. Here is the code #property indicator_chart_window // Input parameters extern int period = 20; extern double deviation
[Deleted]
Dear MQL4 community, thanks for all the support from everyone out there. I need some help on how to add in some comments into my OrderSend() orders which expired without any trades. I know how to add in comments for those EA orders which successfully trade, but for some of my orders which passed...
[Deleted]
hi, is there any possibility to control the orders from an actual running EA ? e.g. the EA generates a BUY order with specific attributes, and i want to design another EA which denies the order from this other system ... is that possible ? or e.g. that there is a controlling instance which...
hi friends I have a problem writing my expert advisor in mql4. The expert that I wrote contains three buffers of external indicators and I want it to wait whenever buffers one and three exceed zero until only the second buffer exceeds zero in the next candlesticks, and if it is positive, it waits
Hi all, I’m testing this function to close an order partially, unfortunately it returns this error "OrderClose error 138" and I can not quite understand the reason. Thanks to anyone who wants to help #property copyright "" #property link "" #property version "1.00" #property strict