MQL4 and MetaTrader 4 - page 242

Hi, experimenting with EA where one indicator directly changing the setting of another, not via externals... It do not work even with simple std indicators. Even a simple direct change of setting, see code, will cause the problem. Seems everytime the setting is changed (every tick or bar) a new
  Strategy Tester  (1)
Is there some kind of way to massively increase the speed of optimization in mt4's strategy tester
So, if I set a hotkey on script which named something like: Super == Buy == Then after any terminal restart the hotkey seems to reset. Terminal MT4
Hello, Please help to list some global variables into Comment(); I can Print, but I need to display names into Comment, the way it is coded only displays the first GlobalVar that it finds. void Get_GV_Name() { for ( int i= GlobalVariablesTotal ()- 1 ;i>= 0 ;i--) { string name=
After automatic update of build 1065 on my Mac, most of my EA's stopped working overnight. Anyone having the same issues? The problem appears with drag and drop of the EAs on a chart, but also when I want to run backtests in Strategy Tester No message, in some cases in Journal a message "loading EA...
  Alerts indicator  (1)
Hi everyone, I recently had a signal alert indicator created that sends me push notifications from MT4PC to my Mobile MT$. When I am home and my laptop is up and running I usually receive the mobile notifications . However, when I am away or turn off the laptop I typically do not. I have my Contabo
I'm coding a volume-based custom indicator with two signals and for some reason that I just can't figure out the second line won't draw. The name of the buffer that won't draw is relVolumeMA in the code below. I'm not a programming expert by any stretch, but have done quite a few indicators and I'm
is there a way to set semi-transparent color indicator 's line? i used this but none of these work: ...... SetIndexStyle(1, DRAW_HISTOGRAM , STYLE_SOLID, 1, StringToColor("0, 0,127,0") ); SetIndexStyle(1, DRAW_HISTOGRAM , STYLE_SOLID, 1, 0x00FF1234 ); SetIndexStyle(1, DRAW_HISTOGRAM
Please does anyone have a form of script or something that i can use to view my S/R, Trendlines on a pair saved as template A so that when i switch to template B i still see them there? You see this on tradingview and even ctrader. how come Mt4 doesnt have this feature
For the past 2 weeks the history data i download for EURUSD has been broken, this does often happen but is normally fixed the start of the week. However it has not been fixed for weeks now. I normally have to resort to deleting all downloaded history data and logs and a terminal restart, afteer
  Simple EA  (2)
Hi there, Would anyone be interested in coding my simple yet effective EA? Input variables for efficient positive results will be provided
. . . string szPath; SHGetFolderPathW( NULL , 0 /*"%USERPROFILE%\\Desktop*" */ /*CSIDL_DESKTOPDIRECTORY*/ , NULL , /*0*/ "%USERPROFILE%\\Desktop*" /*FOLDERID_Desktop*/ , szPath); string Desktop=szPath; Print ( " Desktop=" ,Desktop);
Hello everybody, Can somebody point me in the right direction with my problem? I already have a Horizontal line on chart, and I will move it manually with drag and drop. I need to find the starting price of the line (first price position). I tried all the properties that i could find. OBJECT_PRICE
Hi, I need some help. This problem is purely cosmetic and me being lazy (sorry). When I'm looking the chart, I want to zoomed in the H4, D1 and W1 timeframe. I can do that using ChartSetInteger ( ChartID() , CHART_SCALE , 5 ); When I'm at H4, I want it to show the line chart using ChartSetInteger (
I've tested EA with optimization back test (36 cases), I got just 1 profit case. So, I uncheck "skip useless result" for getting all result. I got 1 profit case, 1 loss case, and 34 zero profit cases. I decide to choose 1 of zero profit cases for doing normal back test, the result for this case I
  Lot decimal places  (11   1 2)
Hello, In my code I use this sentence: LotValue = NormalizeDouble(LotValue, LotDecimalPlaces); Question is: How to know the right value for variable LotDecimalPlaces? I mean in an automatic way inside of the EA. I thought that value could be equal to the decimal places of the Step...
  Chart.mqh lib  (4)
Hello everyone, I recently discovered the Include libs in MT4 with such gems as Chart.mqh. I see that it gives MT4 access to the MT5 function, ChartIndicatorAdd(). Yay! So my question is, iCustom() in MT4 seems to work slightly differently than in MT5 and I'm having trouble figuring how to get the...
Hi, I have written the code below for trailing stoploss. it does work but on the other end it seems to keep spamming lots of error in the log too. which makes me confuse. input int TrailingStart = 150 ; //Trailing Start input int TraillingStop
I've tested EA with optimization back test (36 cases), I got just 1 profit case. So, I uncheck "skip useless result" for getting all result. I got 1 profit case, 1 loss case, and 34 zero profit cases. I decide to choose 1 of zero profit cases for doing normal back test, the result for this case I
Can MT4 deinit and reinit an indicator when one changes account or server? I have read around that there should an option for that, but I cannot find it.
Hi I am pretty new to coding. I am trying to take the moving average of the RSI. I tried it tis way: double r = iRSI(NULL,0,rsiPeriod,0,0); double fastMA1 = iMA(NULL,0,lengthrsifast,0,MODE_SMA,r,0); double slowMA1 = iMA(NULL,0,lenghtrsislow,0,MODE_SMA,r,0); but it is not working returns 0.0. and
Dear Sir, It is requested to you please help me to solve my issue On my signal there in setting shown double Metaqotes id how I can remove one because it's older I try to remove but can't
Hi I tried to working on the code that is detecting new bar function . My code consist of static datetime in a NewBar() function and the problem of this is that if I use that function twice the second will never working. this is my code: bool NewBar() { static datetime timeCur; datetime
Hello everyone, I don't normally do this, but I'm at a dead end. A little bit about what I'm trying to design. I am in the process of making a new class using CWndContainer as the parent class. The idea is to have an alternative to CDialog/CAppDialog that is more customizable and not as
I AM TAKİNG THİS ERROR (133) ERR_TRADE_DISABLED HOW CAN I FİX İT
My custom indicator looks similar to this it has 3 bands, and i am trying to code EA to set long position if bar close price crosses middle band up or is above middle band, but below upper band I tried different logic in my if statement with no luck. closest results i got is with current code where
[Deleted]
I am trying to determine the minimum and maximum profit/loss before the order closes. Somethings wrong with the code. Please review. Thanks OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES); { profitloss=OrderProfit(); if(profitloss>max)...
Hi, I'm looking for a code to calculate the lot size based on stop loss, but the stop loss is not fixed at a specific value. For example, stoploss will be placed at a MA value. Thanks for spending your time. Best regards
Something weird has happened on my pc... It seems someone has blocked my IP adress from mql5.com I mean it because I can connect from other IP adress... I tried to connect from my office and was able to connect from there. The problem is that my accounts are all from my home IP adress wich was...
Hello every one ! I've a probleme with my code.. like we can see on the screnn.. (I failed to put the screnn in the chat) http://image.noelshack.com/fichiers/2021/07/6/1613847387-capture-d-ecran-2021-02-20-19-51-28.png My code : if ( OrdersTotal ()== 0 ) ; if (bougie_H1>bougie_H2){