MQL4 and MetaTrader 4 - page 373

Hi folks was hoping someone could please help me understand what could be going on with my EA. I wrote and EA that takes trades based on the rsi. If the rsi is below 30 it sells and if above 70 it buys. Now the EA works well on the tester for weeks and then suddenly without changing anything in the...
if( 6 && 7  >5) // WORKSPrint("NO PARENTHESIS Yes");if( (6 && 7)  >5) // DOESNT WORKPrint("PARENTHESIS Yes"); Why does first case work and second case doesn't?
Hi guys, I am working on an EA, that uses a break even function.  It uses a for loop to select the orders and make operations with them. void Breakeven()  {   for(int i=OrdersTotal()-1;i>=0;i--)     {      if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES))...
Comm= Comm +"StringToT"+ StringToTime(TimeCurrent() + 60*60,TIME_DATE|TIME_MINUTES)+"\n"; But  Comm= Comm +"TimeToSMath"+ TimeToString(TimeCurrent() + 60*60, TIME_DATE|TIME_MINUTES)+"\n"; Works.
Hi, I've searched the forum here and all articles I find are already several years old. I'm looking for a solution to publish MT4 and MT5 trades information (open, pending and closed) to a website (via MySQL database). Trade information published should follow the possibilities offered by MyFxBook...
Hi I'm new in MQL4 programming... I want to view "current time" in debug mode of MQL4 programming EA ...... is this possible? Maybe with object OBJ_VLINE? I'm try with: datetime LineTime=iTime(Symbol(), Period(),0);ObjectCreate(current_chart_id,obj_name,OBJ_VLINE,0,LineTime,0) but not see nothing......
Hi,  I have an indicator that shows the net wick for the candle, the problem is that it does not autorefresh and to do so I need to change the timeframe The code is the following, please let me know what to do to change it please #property indicator_separate_window#property indicator_buffers...
I know I can assign hotkeys to indicators with Set Hotkey ,but I was wondering if there is a indicator or ea that can assign shortcuts to indicators and can turn them on/off using the shortcut . And ideally that shortcut would be just one key , say i press one key like M and i get a moving average
So let's say I see a scalping opportunity on the 1m or 5m time frame, and I want to get in quick . To get out quick is not a problem,just press the x on the trade. But to get in, even with a stop order i still need to set a stop loss ,calculate the lot size according to the stop loss and the risk...
Is there a way to sleep or disable trades on specific pair while running 1 EA?
  Sleep(4.32e+7); // - 12 Hours   Sleep(2.16e+7); // -  6 Hours   Sleep(1.08e+7); // -  3 Hours
Hej Can anyone help Haw can I get an sounds alert have seen one had a spech alert at trade is being open an closed on MT4
Hi there guys. Can someone help me and tell me how I can change this indicator to use ONLY 1minute timeframe data in it´s calculation, regardless of timeframe it is loaded in? Those are pascal willain effective volume formula, but the code is not correct because Pascal uses 1 minute data for the...
How do I solve a metatrader 4 slowdown on the accelerations of the nasdaq and the market in general? Hi everyone. I have the metatrader that keeps crashing for 40 minutes because the market is in turmoil. I put less indicators and in 8 seconds it opens but stops and...
So say I do Alt+R and I have 6 charts open at the same time on my screen. How can I select all of them at the same time so when I want to change the time period it changes for all of them , or say I want to apply a template to all of them in one click . And another question . Say i have gbp/usd
I tried get the bars between two ma crossed but it not reset and start from 0 it's looping ever please guide me in right direction
  mt4  (1)
my mt4 has been stuck on update for 2 days I don't know what to do
Hello, Please forgive my ignorance with all of this. I have started to learn mql4 a couple of days ago and I have no previous coding experience. I was very proud of my first script when I realised that I misunderstood how scripts work. Of course what I need is an EA. The basis of what I need it to...
Hi Guys Im new to coding but does anyone know why my sell trade is opening and closing on entry. Ive put my code below feel free to stick it into MT4. #property strict     //Always Keep// FIND OUT WHY SELL ARE NOT WORKING AS EXPECTED //.............Input Variables.......................................
As the title says, I'm in a rather dire need of an EA/indicator for MT4, that alerts one when an X pair is above X amount, E.g. a pair EURUSD (and only EURUSD) is currently at -20 in Profit/Loss from 4 trades. The said EA/indicator is set to alert one when Profit/Loss reaches an...
Need to compare every single bid of last month for some calculations (about 2 million values just for EURUSD alone). Putting them all in an array (need to do so for 31 instruments) seems too clunky. Any better way? I have been just writing bids to a file, then using bash on the file (where I can
Hi, I am trying to write an indicator and have run into a problem with getting it to compile. I would really appreciate any help anyone can give. The indicator checks that :- MA's on 2 timeframes are aligned the last 3 closed candles are all higher or lower than the previous candle At least 1 candle
I have several EAs, follow several signals and have some accounts. I would like to know how to setup my 3rd party VPS (2 core CPU) best: Some EAs take a lot of CPU power or consume a lot of RAM. 1. Better to have a single MT4 instance to run all EAs and manage all accounts? 2. ..or run a separate
Hello everybody,   I'm looking for Open interest indicator  and I don't find any site to download it? Can somebody tell me where I can catch it for MT4 plateform? Thank in advance.
Does i stand for indicator or index? Or what? iBars, iBarShift, iClose , iHigh, iHighest, iLow, iLowest, iOpen and so many others? Thanks
how to check if current bar is less than 10 bars away from previous bar? Datetime Previous_bar_Time = iTime ( _Symbol , _Period , 0 ); if (Time[ 0 ] < Previous_Bar_Time + Time[ 10 ]) { //do something } I think the formula above is wrong, may I know what is the correct formula
Hi guys,  I have just started learning coding with mql4 and really need someone to help me and to teach. I am trying to make an indicator that shows a chart of average volatility of an hour of one day of the week fro n-weeks. So, calculations are following: I take an hour (for an example 1 am on...
How do I pass strings through a buffer for iCustom functions?
Hi Everyone, I've been using MT4 for about a week or two now. From what I can tell it's very buggy and the business is poorly laid out as I'd be forced to contact an e-mail based in Cyprus with any technical issues and they won't get back to me so I thought I'd try here first. Has anyone else had...
  NormalizeDouble(Bid, Digits)  (32   1 2 3 4)
I want to get exact BID,ASK value with normalization. But i can not able to do that following most popular way. Print("Bid : " +Bid + "  Ask : "+Ask); Same result on after "NormalizeDouble" string Sbid1 = NormalizeDouble(Bid,Digits);string Sask1 = NormalizeDouble(Ask,Digits);//double Dbid1 =...