MQL4 and MetaTrader 4 - page 25

To post a new topic, please log in or register
Playsound in MT4 MQL4 has a bad error: Playsound does not work inside of loops. .. Playsound ("catsway"); // works well for (i=0; i...; i++) { if (i==...) // about once per hour { Playsound (dog.wav") // never works } Who can help me with an idea or better a workaround. Please send me an
Hey all, i've written a small code and all is working but this condition is not, i don't know if i have coded it wrong or i'm missing something if you can help me RSI = iRSI(NULL,0,RSI_period,RSI_applied_price,1); if((iBarShift(NULL,0,SignalCandle) > 0) && (isTradingAllowed())){
Hi, I have been checking some youtube videos about Backtesting. Not just to learn how this can be done (I still don't know it) but particularly to find out whether what I want can be done with Backtesting or not - if my desire is even possible in MT4. Although I have zero development knowledge and
hi i used CHARTEVENT_OBJECT_CREATE to change color and the name of every trend line user draw on chart and i used a Counter to add number to a origin name and put it on trend line but it's cause a endless loop and Counter don't stop Counting
Hello, I started with Forex trading this week from my iPhone app using my live account after switching from the demo account (broker: Oanda). I’ve been using MT4 all week without a problem and suddenly today (Friday) around 5-6pm, I go back in cannot see anything (balance, trades from the week and
  error 130 (3)
I have been getting this error and I cant seem to figure out the cause. I have been trying for the last 3 days to figure it out. I assume its because of my send order operation so I have adjusted everything I can think of. Nothing seems to stop it from appearing in my journal during backtesting. one
Hi all, I am really new to mql4, coming from NT world. I downloaded a custom indicator which plots 2 lines (white and blue). All I want my EA to do is to go long when white crosses blue and go short when blue crosses white. However, I want it to be done only if cross happens after the one-day candle
hello guys please i need your help, i developed this EA that uses CCI and moving average filter it was all good but my problem now is that it opens trade on every bar for example if you place it on a 1H chart it will open trade on every 1 hour. please how do i prevent this from happening. Let me
Hi, first time this has happened to me but the charts for USDJPY, NZDUSD, AUDNZD do not show on screen. The charts for the other pairs I trade are fine. The MT4 platform is via IG broker. The usual MT4 page is there but all I see in the chart area, at the bottom, is the tops of my count numbers and
brand new to forex. opened a demo account via mt4 app on iphone. was able to make trades yesterday no problem. Today I was not able to place trades. kept saying common error? I did not try to put a stop loss or take profit price so i know its not a math error. internet working fine. Anybody able to
I want to show automatically a template on the chart when I use my EA, So I used Alert(ChartApplyTemplate(0,"My_template.tpl"); When I run my EA, the Alert returns True, but my template is not applied. (I also tried without the "Alert") The template works fine when I add it manually. Any idea where
When I first run MT4 or first attach the EA to a chart, the EA is loaded and initialized, but after removing the EA by "Close(x)" button of the standard library CAppDialog, the next time I attach it, it is loaded successfully but not initialized and does nothing until I change the time frame or
Hi everybody... How we can made a function in mt4 editor to count time as a common clock second by second independent of tick value from the broker
Greetings everyone, I need a little help from you .//---- ma_angle_mtf.mql4//---- indicator settings#property indicator_separate_window#property indicator_buffers 3#property indicator_color1 LimeGreen#property indicator_color2 FireBrick #property indicator_color3 Yellow#property indicator_width1
Hi I had downloaded MTsetup64.exe but my choise is for 4 version. why even if I choose version 4 does it install version 5? I'm interested in using language version 4: is it possible with mt5? Thanks Best regards Massimo
Hello I got many charts opened(USDJPY,GBPUSD,...) at the same time in my mt4 plateforme In one of this chart ,runs an EA Visually we can see in which chart it runs But is it possible programly to know the chart ID number in which the EA runs between all others Regards
When I opened MT4 today I was asked to login again and all the indicators and templates I added were lost. I have no idea what happened here. Everything was still working fine yesterday and I didn't need to login when I open MT4. I have to start adding the indicators and templates I use all over
Hi there Can someone help me so i have this Txt file that i want to import into mt4. The problem is that when im trying to import it into mt4 then it changes the date format. So for april 1st it somehow goes and changes it to december 12th Two days ago it makes it into 2020.11.03 Theis
Hi, fresh new to MT4 I was unfortunate to deal for a lot of time with etoro that had his own platform totally different from MT4/MT5 There you could have a overall percentage calculation that you can use it if you DCA I also try to create a robot but is based on browser data and not desktop
I have a script which seems to be working but am trying to backtest so that I can improve on the results. But when I try to back test i get the following error: 2020.03.31 13:53:22.717 2020.03.27 20:30:00 EATest AUDNZD,M15: OrderSend Failed with error #(131) - invalid trade volume I've read all the
Hello,How can I change a double value say 0.1784257 to 0.1 When I used NormalizeDouble(0.1784257,1) it was converted to 0.2 I don't want a rounded number. I need just first one digit after the decimal point. Any help please
hi all im new here and trying to understand the codes i want to know what these numbers( marked Red color) means ???double haLowHigh_1 = iCustom(Symbol(),0,"Heiken Ashi",Red,White,Red,White,0,0); 0=? double haOpen_1 = iCustom(Symbol(),0,"Heiken Ashi",Red,White,Red,White,2,0); 0=? double
A couple of days I did deposit some money in my mql5 account. When looking at MT4 the Balance was not updated. I‌ don't remember what I did, but finally it worked. The other day a friend of mine had the same problem and now my brother as well. I‌s there a way to refresh this so I can see the balance...
Hi, I purchased a subscription to VPS for my platform MT4 brokerage account. My problem is I cannot connect to the VPS server from my platform, any help out there, thanks
ok I have tried to find an answer but I'm not seeing it. I have searched the forums but none of the solutions seem to apply to me. I'm probably wrong though. the error is on the final "}". Thanks for your patience. //Function to Check the last 100 candles(trendLegth) to look for a trendbool
I would like to test my EA with crypto currencies - ETH, BCH, DSH, LTC, XRP. I need 1Minute timeframe. Unfortunately there is not enough data in the history center. There is only enough data for BTCUSD. Other cryptos mostly have last 2 weeks and some data till mid of 2019. Does anyone know where can
I was wondering how we can draw a histogram on the chart or rather cover the candleswith a specific colour. For example I'm trying to cover white candles with greenwhen the white candle is longer than 15 pips. Here is the code I've written andI don't know what's wrong with it. Any ideas?...
Hi There, I would like to know were I have gone wrong. Attached below is the code. It is giving the error message FUNCTIONDEFINITION UNEXPECTED. void Ontick() { double K_Line= iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1); double D_Line=
Hello all,  A beginners mistake I'm sure, but haven't been able to find a solution on here that's worked. void OnTick(); double K_line=iStochastic(NULL,0,20,3,5,2,0,MODE_MAIN,1); double D_line=iStochastic(NULL,0,20,3,5,2,0,MODE_SIGNAL,1); double pK_line=iStochastic(NULL,0,20,3,5,2,0,MODE_MAIN,2);...
Hi Everybody, I am trying to retrieve the details of the last open order (i.e. not pending) , but the code below does not seem to work. Any hints? Thanks MG for (int Counter=0; Counter <= OrdersTotal()-1; Counter++) { OrderSelect(Counter, SELECT_BY_POS,MODE_TRADES);