MQL4 and MetaTrader 4 - page 164

To post a new topic, please log in or register
Hi, I'm using Metatrader 4 build 950. I am trying to implement an abstract base class use pure virtual methods. After reading the documentation (https://docs.mql4.com/basis/oop/abstract_type), I thought easy - very similar to C++. But is just won't compile - not even the examples in the...
Trying to develop a simple Expert Advisor with RSI functionality but it does not seem to work, in addition to this, I wonder how I limit the number of trades to one at a time. Feel free to improve and correct the EA below. // import the trade library#include<Trade\Trade.mqh>// create an instance of...
I have an Expert Adviser that is using iCustom to call a market supplied macd. It works fine in the Strategy Tester while I am using default inputs, but there is trouble when I put the inputs into the iCustom parameters. While in the tester,  the new inputs still enter trades on the Arrows as before...
Not sure if this is the right section for this but being a newbie i'm not sure about nothing :-( I accidentally closed my toolbox, can anyone direct me on how to display this?
Hello everybody, Please give me some ideas ... I have used PumpingSwitchEx function for pumping initialization. But after some time the pumping was stoped. Next try give the error: Connection lost. How I can re-initialize pumping and reconnect to the server again? After stoping function "Connect"...
Hi, everything is OK about my EA. However whenever i put this protection code to my ea. It stopped using TP & SL!! I have tried to use account verification code... please take a look below //+------------------------------------------------------------------+//| Waelmore I//|//|    Created by Black...
I wanted to start a mt4 at the location: C:\Users\cas\Documents\MT4\mt5. But as  you can see the starting process hangs using one of my 4 kernels completely (CPU = 25%) and , forcing the other running mt4 (1-4) to have a higher cpu-usage as well and , the system requests all of a sudden 16% If...
In my mind I have the for loop and the array set correctly what is causing this array out of range error? Keep in mind I am brand new to programming and this is my first attempt at a functioning program....
Hi, Is this possible to display the comment on chart with bold/big size font and different colour? currently i used to display comments as normal. but i like to display header as bigger font with bold and ey-catch colour. Please help me if there is any functions available to use? currently i use:...
Hi Guys, i've been searching with not much luck for an MT4 version of the ConnorsRSI. A lot has been said about this indicator, which was developed by Larry Connors and Cesar Alvarez. The indicator is available for amibroker and tradestation but find no coding for MT4.. Can someone be able to help...
Need help on my 2 MA crossover EA. The EA will close the trade if the price reverse too quickly (but did not hit the stop-loss). I think is because the MA also reverse/repaint. I think is because the MA is "drawn" on every tick. How can I make it 'trigger" only after the close of the candle? Hope...
Hello MQL4/5 Community, I have a question regarding a function i want to build into my custom indicator "my indicator". So basically my indicator cointains multiple indicators and summarizes them into the buffer sum[i]...
Only the purchase position opens Can you help? thank you all void OnTick() { if (Bid > High[1]) { OrderSend(Symbol(),OP_BUY,1,Ask,0,Bid+40,0); ; } if (Bid < Low[1]) { OrderSend(Symbol(),OP_SELL,1,Bid,0,Ask+40,0); ; }}
Hello, Wondering if someone might have the code needed to add a Fib Retracement on the High/low of the Previous Period on the chart?  Example,  If I'm looking at the hourly,  it would place the Fib on the High/Low of the previous day (Which is between the period separator), If I'm looking at the H4...
Hi All,     Have tried searching with no success.  I am having trouble sharing doubles between 4 EA's running on 4 separate Metatrader4 accounts running on my VPN.  The VPN is running Windows Server 2012R2.  I have used GlobalVariables years ago with no problems... but now they don't seem to cross...
double L24[]; double L32[]; double L40[]; double L48[]; i try to get those values,but i couldn't code. please help me .how can i get buffer value when arrived every tick? <Decompiled code removed by moderator>
<Link Removed> What are you thinking about this service.
Hi all, first of all, English is not my native language so I hope you won't get angry, if some misunderstandings occur in this thread ;-). Furthermore I want to give you a realistic view about my programming capabilities - well there are almost none. I can print "Hello world" in Python and know...
I have an Indicator that displays some information panes on the Chart window and one of them is at the right top side of the chart. The problem is that when someone will attach an expert to this Chart, the Expert name and its smiley are appearing right there. So, I need one of this two options: 1....
Dear friends,    I am learning to code in mt4 and got a hang of it. I came across an indicator that display buy and sell value as seen in the screenshot below. Please guide me with study material or sample code on how to display buy and sell suggestions like seen in the screenshot. The logic is my...
Has anyone experienced (in Metatrader 4)   having their position closed for no reason? in the DEMO version? It happens after about 30 minutes.
What and why do I get this as my MT4 EA opens an account?
hi all, I hope you are doing well. I'm looking for a MT4 programmer to develop the following EA: Step1: Write every hour all retrievable details from the orderhistory section in a mysql db table.(drop the old table in mysql db) Step2: Write every hour all retrievable details from the open/pending...
Hello all! I'd like to add to some EA's a notification function that, well, notifies when a TP or SL has been hit. I made a kind of BETA version of the actual code but I'm facing some troubles that I'm not sure how to overcome:    for (int i = 0;i < OrdersHistoryTotal(); i++)    {      bool...
Dear Metatraders  I am trying to develop an indicator that show me the highest high and the lowest low of the last 100 bars of all Major currency pairs,  This is part of my codes: double dEURUSD[2];dEURUSD[0] = High[iHighest("EURUSD",PERIOD_CURRENT,MODE_HIGH,100,1)];dEURUSD[1] = Low [iLowest...
I can only enter integer into the Deviations box. If possible please draw an arrow on the chart please, Red for put and Green for call. thanks Here is the indicator: bollitoucher.mq4
I set EventSetTimer(1) in OnInit (bool result is "true") , and I put my code in void OnTimer, but the indicator is still going through OnCalculate, which defeats the purpose of using OnTimer because the data received from the broker isn't faster than 1 second in some cases. Is there a way around...
I want to populate an array with currency pair values. Arrays are quite a bit different from Javascript I'm gathering. I'm totally new to programming and I took some online courses in Javascript to help prepare me to learn MQL4. I'm running into a snag with arrays. I dont understand the MQL4...
Please help some experienced coder. After compiling get error constant expression required. Problem is in array, strenghts is in pips. My idea is to get stongest and weakest pairs. Code:                 int num_array1[8] ={EURstrenght,USDstrenght,AUDstrenght,NZDstrenght,CADstrenght,GBPstrenght...