MQL4 and MetaTrader 4 - page 236

Hi everybody. I want to compare moving average of two points to check if moving average chart is ascending or not. double startEMA = iMA ( NULL ,TimeFrame,MovingAveragePeriod, 0 , MODE_EMA , PRICE_CLOSE , 1 ); double endEMA = iMA ( NULL ,TimeFrame,MovingAveragePeriod, 0 , MODE_EMA , PRICE_CLOSE
[Deleted]
Hi everyone, I have been experimenting with strings in mql4 and have stumbled upon a situation I cannot solve: int myInt1 = 0xffa8b; //myInt1 contains an integer as expected int myInt2 = StrToInteger("0xffa8b"); //fails int myInt3 = StrToInteger("\xffa8b"); //fails Does anyone have thoughts on why 2...
Hello I have a code that I have been modifying with what little I have been able to learn but I feel stuck I have not been able to finish what I need if someone can help me I appreciate it .. the following code its function what it does is draw a rectangle to a certain time that I want but that
I think they are the same, right?
[Deleted]
something has changed in MT4 for me with any EA attached, it makes a noise every pip which sounds a little like a telephone ring. there is nothing in the code to cause this. Can someone help me stop it
Hey Guys. I tried to run my EA and it's supposed to set two Sell Limit orders at the top. However, only one Sell Limit order is placed. I checked the error and it says "Trade Operations Not Allowed By Settings". The thing is, I already enabled automated trading button, checked the boxes that allow
Hi, I'm trying to write a simple script to close a manually opened position, but I do not know how to let the system to "detect" an opened position. Need advise on this. Or is there any sample available? Thanks.
Hi, I have a a couple of loops counting P/L trades and it works without issues in back-test but when I start the EA live, they fail to get the trades with matching magicnumber from Account History. Note that it still gets the live OrdersHistoryTotal number when starting EA live but can no longer
I am currently working on a VWAP indicator that starts calculating at the beginning of each week. I can get the indicator to restart each week and continue into future but cannot figure out how to correctly loop through all bars to get past values. Please help
The old code was if (Cur_ClosePrice <= openPrice - STP * _Point ) { int res = OrderClose(OrderTicket(),OrderLots(),Bid, 3 ,CLR_NONE); if (res != - 1 ){ OpCnt--; BuyOpenCnt--;
i've backtested this EA but it only gives the result of one day (only the beginning day of the backtest). try it yourself and you'll see.  For example, I want to backtest GBPUSD from 5 May 2019. But the backtest result only shows the result on 5 May 2019. And if I change the date to 4 May 2019, then...
my trade accout has frozen,the screen is stuck on'update' and i no longer can trade. i was also trying to open up a demo account around the same type that it froze. what do i do,matthew warren
  Error 4066 HELP  (4)
Hi!. I'm asking for help, because i'm not really understanding what should i do to avoid error 4066. Basically, my goal is to store the value of iTime and iBars inside some variables right when the bot gets initialized. The problem is that i cannot do initialize the variables in the OnInit()
Hello everyone. I am trying to download a bot for MT4. I am using this URL: https://www.mql5.com/en/signals/mt4 When I click to buy them using the Start copying in MetaTrader, mt5setup.exe is the only thing that downloads. How do I select from these robots? Thanks
Hi everyone, is possibile to use the MQL5 Cloud Network with metatrader 4? it is mentioned in this guide for mt4 but I can't find it https://www.metatrader4.com/en/trading-platform/help/autotrading/tester_optimization
I would like to know if this is possible, i have a script that i want to test that check some data from the latest 2 Hour 1 candles, but i want to be able to run the script on a history timeline, not only live. Is possible to run a script in a previous timeline? I prefer to not alter the code for
Hi, I've got an indicator I bought in the market that has too many parameters to be called by iCustom function in my EA This is the code I used iCustom ( Symbol (), Period (), indicatorName, ""
indicator is not ploting properly and not ploting levels on many chart. its plot on previous chart but its not ploting in current chart. its coming in forex chart on mt4 but not coming on other scripts of same broker
  EA related issue - Urgent  (13   1 2)
I would like to know if i'm running an EA on a broker MT4, is it possible for the broker to make out how the EA is working and about conditions EA is taking the trades?  Is it possible for the broker to take away the system on which EA is working? Reply from experienced coder or programmer is highly...
  function error  (1)
Hi everyone I have this simple code function that give me an error message "'}' - not all control paths return a value" bool GreenCandle( int shift = 0 ) { if ( iOpen ( Symbol (), PERIOD_CURRENT ,shift) < iClose ( Symbol (), PERIOD_CURRENT ,shift)) return true ; } I have a return value but why
i hello.i am about to use a telegram to mt4 trade copier.i want to ask though, is thill possible seeing as i am also connecting my tradingview to telegram through webhooks
Hi everyone, is there a magic number for manual orders? some on this forum have a view that by default it is zero. is it so? is there a reliable way to identify and differentiate between multiple orders placed manually
  Pip counter  (3)
Hi guys,i'm new to mql4 programming and i want to make a "sort of" martingale system. Right now the code looks like this void OnTick () { if ( OrdersTotal ()== 0 ) { OrderSend ( _Symbol , OP_BUY, 0.01 , Ask, 3
Hi guys hopefully someone can help. I have an EA that should take trades at a certain time of the day and based on a bullish or bearish candlestick but it does not execute anything and there are no errors. This is how my code looks: input string TP = "Make sure its not zero and over a certain amount
MT4 Software Push Notification to Phone App Suddenly Stop Working. Please Help
  RefreshRates()  (2)
Great for the current chart. But my EA needs to pull the latest Bid/Ask pair from other symbols. How can this be done efficiently? I am assuming MarketInfo? ex. double NJask=MarketInfo(" NZDJPY ",MODE_ASK);
hey guys can someone please help i have the alerts on my mt4 paltforma and they cant seem to go away as am not really winning on them...can anyone please help. many thanks
I am experiencing a strange problem using iHighest to find out the index of the highest bars. It works for smaller number of bars, but if i test it with large number of bars then its giving me meaningless index value. int val_index=iHighest("EURUSD",5,MODE_HIGH,650,600); Print(val_index); the code
  error vps old archive ex4  (20   1 2)
can someone help me with this synchronization error