MQL4 and MetaTrader 4 - page 158

  hi community  (1)
i am basic programmer anyone help me whenever i will get any close order then immediately i have to open one buy and sell for the same currency But my codings are working first two orders closing then will be immediately open my new buy and sell order here my codings void OnTick() { //--- for
I've been trying to understand the nature of the error there are no trading operations , which appears regardless of whether I add a bunch of checks indicated in this article (https://www.mql5.com/ru/articles/2555) or, on the contrary, remove all the checks and conditions, so that nothing interferes
//+------------------------------------------------------------------+ //| Mom Vol2.mq4 | //| Copyright 2021, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+
Hi there, I am writing an Expert that is going to open trade on Buy/Sell signals (arrows) from Hull MA indicator This is an example of my code: double val = iCustom ( _Symbol , PERIOD_CURRENT , "hull-moving-average-arrows" , 34 , 0 , 2 , 1 , 5 , 0 , 0 , 0 , 0 , 0 , 1 , 2 , 233 , 234 , 1 , 1 , 1 );
I want to place 1 buystop and 1 sellstop pending order and let them close in the next 6 bars, and i don't how. //buy setup if ( OrderType(OP_BUYSTOP)== 0 ) { OrderSend ( NULL ,OP_BUYSTOP, 0.01 ,RR, 3 ,RR- 20 * _Point , 0 , NULL , 0 , 0 , clrGreen ); } //sell setup if (
Hi all, My MT4 in my macbook suddenly cannot launch. Before activating the terminal, a window pop up saying shutting down the app. Anybody knows how to fix this? Thank you in advance. Josh
As shown as the below image, I have tried restarting the MT4, recompiled those indicators, refreshed on the Navigator window. Unfortunately, none of them work, would anyone know how would it be fixed
[Deleted]
I am wondering whether if I can install the same EA into 2 different trading account in the same terminal. If so, please tell me what to do, thanks. Same MT4 Terminal Account 1: EA1 Account 2: EA1
Can someone guide me which's EA will force to close all of open positions (including profit and/or loss) if the margin level reach certain percentage? ​Thanks in advanced
EDIT:Whilst it seems to me that this Normalization used to be a problem, theexperimental test indicators and scripts below have convinced me that this isnot (or is no longer) a problem (at least with the latest MT4 and with mybroker). The thread remains primarily for the indicator/EA below, which...
Hi! Can anyone please tell me a solution for this problem that the message I tried to write in excel (.csv) was written in single column of a row altogether. Not in different columns. My code was this: string handle = "testingexcel.csv"; int myexcelhandle = FileOpen(handle
Hi everyone. I need a little help with this issue I'm facing. I'm reading an .csv file in mt4 using mql4. The file has 2 columns and 20 rows. I'm able to read the data from the file but when I read data, in the first cell I get some unknown symbols with my data that is causing problem with my
I would like to get an indicator converted to mt5 from mt4, but I only have the ex4 file and not the source code. Is it still possible to get it converted from the ex4 file or what I need to have it built from scratch
[Deleted]
I have a few queries, I have different trades of each day and time of the week and I use breakeven. The problem arises when there's lets say a buy trade that is still running and I need to get into another buy trade. My question is can I be able to enter into another buy trade while this one is
Hi I have install like 3 different EA's but the don't open trades it just says trade is disabled in my journal.could anyone please help me
Whenever I start backtesting, I face the following errors and I have many mismatched errors in the report. Can someone help me and explain if this will influence my real results
Hi, While running this code snippet, error is coming saying OrderType returns void. CODE: for (int i=OrdersTotal()-1 ; i>=0 ; i--) { if (OrderSelect(i, SELECT_BY_POS)) { OrderPrint(); Print(OrderType()); } } ERROR: expression of 'void' type is illegal 1 1 OrderType should return int type
Does anyone know where I can get the code to calculate position size based on the instrument,percent risk and stop loss size
An EA I created that calls a custom indicator using iCustom executes trades 2 bars after the indicator has triggered on the chart. Any ideas why this would be happening? Any advice greatly appreciated
We all know that after MT4 is installed, there will be other files in this path(C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal), but I have nothing here. The software is installed on the C drive by default
I've attatched a video of what is happening in my app. A couple issues. 1) The button on the Main Tab you can only click on the left side... This was weird.. However, then I realized it was being masked by the "Edit" entry on another tab. 2) Likewise when your on the other tab, the left of the
I have developed an EA in MT4 that I'd like to make available on Market. The EA is still working on my account and successfully did backtest, still, when I try to upload it I'm told it is of invalid type (apparently a script) What is I can do to have this properly seen as an EA from the Market
  GlobalVariables?  (4)
Does anyone has a sample of a code using GlobalVariables in the simplest form in MQL4? I want to use it in my EA but I have not fully understand how to use it yet. I have read the https://docs.mql4.com/globals but I'm still confused, it's better if I get more examples. Let's say I want to stop
hello First, sorry for my english not so fluent (very bad actually, hahaha) I'm develop EA that autenticating to MySQL database in our hosting server. In that purpose, the EA need to access files : \Include directory \Library directory \Files directory If there are new MT4 installed, we (me and my
Hi, Please Update the profit price change the color same as MT 5. coz very hard to check profit and sometimes close it wrong one and lost money. so if you change the color of profit like MT 5 type then very helpful. i just attached screenshot what i means/
Hi, a friend of mine just subscribed to one of my signals, and even when on his ends, platform says he is subscribed, on my end it doesn't show, should i wait a couple of days for it to show?? it is my first subscriber, so i don't know..! thanks in advance
Whenever I try to download mt4 from Meta-Trader it always downloads mt5
  Maximum Loss  (12   1 2)
if(TodayLastProf()>=-4){// do this}double TodayLastProf(){double sum;for(int k=0; k<OrdersHistoryTotal(); k++){if(OrderSelect(k,SELECT_BY_POS,MODE_HISTORY)){if(OrderSymbol()==_Symbol && OrderMagicNumber()==magic_number){if(TimeToStr(TimeCurrent(),TIME_DATE)==TimeToString(OrderCloseTime()...
Guys, I'd like to ask. Especially those of you who have experience with PAMM master/slave accounts. Is it possible for the master account to delay the open position for 30-45 minutes? The details are like this. Master is opening position sell at 06.00. The master purposely hides this open