MQL4 and MetaTrader 4 - page 273

Hi everyone, I have started getting 'OrderSend error 130' when trying to use the strategy tester on a piece of code.  I am incredibly confused as to why this is happening, as I am running the code live (With the same broker) and have no issues. Similarly, I tried inserting this basic buy signal code...
Hi guy, I need display my custom indicator that consist on two different buffer. Can I display these two different buffers on two different charts? I'm grateful on your help. thank you
Hi all, I have an indicator I have coded that displays a buy/sell arrow when certain conditions are met. I want an alert sound when a new arrow appears and for the sound alert to play only once. The code below continues to play the alert sound on every tick . I get why it does but how do I amend it
Hello dear guardians, a part of my EA displays the sum of all open buy trades PL on the side of the chart, it works. but the problem is that every couple of seconds the normal 1.23 format profit turns into something like 1.2399999999and then very quickly goes back to 2 decimals(hence the lack of
Hello guys, Someone could help, I don't know how to close an order at a specific price. For example, I say I want to close my order at 1.1850, this value is an external input. My problem is that when I set the value, my script closes my order instantly regardless of the price that I had set (in
I have used mt4 for so many years and this is a constant problem. On dragging the crosshair, it keeps disappering before I can drag it to point B from point A to measure the number of pips. I've tried pressing shift, control , and alt with it, but it still disappears before I can reach point B. Is
How do I change the drive MT4 is saved on while maintaining all my information that is connected to that terminal? (EAs, indicators, accounts, set files ect) I tried moving both the MT4 terminal to D: drive from C: and moved the whole data folder to the same place while maintaining the sub
Hiya, I'm very new to MT4 and I wanted to know if I can create a robot that allows me to execute multiple trades at the start of the USA open (i'm in the UK). I usually have circa 20 trades to place at once and I tried doing market orders before the open only to experience slippage and major loss
Hi My query is , " how to calculate price of the signal candle?" Can any one help me please? Below is my code for indicator. //--- indicator settings #property indicator_chart_window #property indicator_buffers 2 #property indicator_type1 DRAW_ARROW #property indicator_width1 5 #property
if i want to know last trading day 16:45 (M1) that bar. how to do this? i made a code which can know the previous 16:45 bar (M1), but if Current time pass 16:45, let said 16:50, this code only can know the previous bar 16:45 (M1), but i want to know last trading day 16:45, even if today current time
Hello, According the new FIFO rules of NFA the first open position must be closed first. At first glance I wrote this code: int ClosePositions ( string symbol ) { int orderstotal = OrdersTotal ( ) ; int orders = 0 ; int ordticket [ 100 ] ; for ( int i = 0 ; i < orderstotal ;
Hi All, I'm trying to convert amounts from base currency to my deposit currency but i got stuck with MarketInfo that gives me zero when i use it like this: MarketInfo("EURUSD", MODE_ASK); I checked that the currency pair "EURUSD" is available in MarketWatch. Thanks in advance for your help
Today we're launching our new corporate website that contains the detailed information about our company and all our products. Visit this new website to read about the MetaTrader trading platforms and the TeamWox company management system. Besides, news regarding our company and products will be...
Good Day Friend, I'm having a challenge Try to Create Serial key for my new ea, a serial key that work one only one account per serial key. I got this example from mql4 code base but it doesnt show how on serial key is restricted to one account here is the code
[Deleted]
hi, just wondering if anyone can point me in the direction of how to go about making the trailing stoploss of my EA equal to a moving average value. cheers geoff
Hi Please assist Trying to code an indicator, i would like to use the below indicator as directional bias , how can i get the bias from this indicator on the given TF
Hi, I am getting Zero Divide in Backtest of an Expert for this Indicator. I added it as iCustom and there are indications in the script about how to add it as iCustom but it still gives Zero Divide. It skips it it the Backtest but it looks like in Live Demo it might be blocking it. Do you know what
I am using BitmapLabelObject from mql4, to put a bmp on my panel. Though, the image has transparent background, it looks like a boxed image on the panel having white background. Also tried having an background color of the bmp as my panel color, Still it has white background. How can I fix it? (I
After updating to 1280 build, my MetaEditor stopped working. I am on Linux and Wine. Before the upgrade everything was good. When I click the MetaEditor icon in the MT4 toolbar, nothing happens and I got the message in the Journal: "MetaEditor not found". The metaeditor.exe is in the proper folder
Hi I am new in mql programming, I want to get specified candle trend by time : for example I want to get the candle in 8:15am (m15 time frame) trend , and if its red (down) do something or green (up) do somthing please help me to write this
Hi, thanks in advance for the help! I've spent hours trying to get this to work but after searching everywhere I still don't understand why it's not working. Any help would be appreciated. The following is defined at the top of the program for users to enter their offset from the exit moving
Hello, I contracted to have an MT4 expert built to my exact specifications. I paid for said expert to be built and now the coder will not give me the original source code and has written a copyright on the EX4.  I mean it's my idea and I paid for him to do it isn't it my expert?  Can someone with...
Please i want to create a trading bot (EA) i want to use it so that others can copy the trade of the EA from a broker trade copier. Python is my programming language, I know that mt5 has a python intergration module, but my broker doesn't have option of a copy trade for mt5 So i need help on how
I'm sure I'm making a newb mistake. if (whatever){ if (whatever && whoCares){ CloseBuyPositions(); /////// Gets error: 'CloseBuyPositions' - function not defined } } void CloseBuyPositions(){ /////// Gets error: 'CloseBuyPositions' - function declarations are allowed on global
Hello I just started MQL4 recently and being the complete newbie that I am, I would like to ask some help on the code below. Basically I am trying to have my EA randomly choose buy/sell on every tick and enter an order until it reaches the max number of orders . However after running the code on
I would like to capture the alert information for my indicator In real time ! I was thinking of capturing by / MQL4 / Logs but I saw that they are not inserted in real time, does anyone have any idea if there is a possibility to do it via webrequest? Thank you very much
I am using some Global Variables in my MT4 EA to store values which should be retained if, for example, the server re-boots. In the OnInit() method, the existence of these is checked using GlobalVariableCheck() for each variable. If not present, the variable is re-initialized, and a message is
Hi, I am trying to install Metatrader4 not the MT5 but it is keep installing Meta Trader 5 version. Can anyone please tell me what could be the reason ? I downloaded Meta Trader 4 from below location, file name mt4setup.exe https://www.metatrader4.com/en/download
[Deleted]
Hi all hero traders and tradettes. I want my EA to run once per bar. I have heard of complicated ways to do this, but I may have figured out a simple way. Setting a global datetime variable and an if statement making the program execute only if the datetime of the current bar is different to the...
Hi. I was thinking of making a indicator that plats the comment of pending orders on those buy/sell Limit/stop lines. Is there any way of finding pending orders? im using this for something eleas but this only gives me trades that have been open for ( int i=OrdersHistoryTotal() - 1 ; i >= 0 ; i--)